I'm baffled by the fact that the __str__ method of an instance fails
before the instance is saved but works fine afterwards.
The relevant snippet from my models.py file:
class Journal(models.Model):
date = models.DateTimeField(default=timezone.now)
user = models.CharField(max_length=24)
Hello,
Most apps I know don't do such things. They write everything needed for
them to work in their docs, and if something is not set, they either work
with a sane default, or raise ImproperlyConfigured. I do the same myself.
Also, Python does this in general; it assumes you read the manual befo
We've made the first release on the way to Django's next major release,
Django 1.9! With two and a half months until the scheduled final release,
we'll need timely testing from the community to ensure an on-time and
stable release. Check out the blog post:
https://www.djangoproject.com/weblog/2
Sure, you could have several admin site with the same models.
I read an specific page about how to do that, but right now can remember
what is the specific url.
Those other links could help you.
https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#the-register-decorator
http://blog.tryolabs.
Hi Felix,
The way you create your validator instance it is passed the
value returned by `date.today()` at module initialization time.
That is when the Python process starts.
It means that if you started your development server or say
a gunicorn process on your server yesterday the max value
the v
That's an interesting idea. Thanks.
I suppose it's possible to register models with two different admin sites,
although I've never tried doing that myself.
On Wednesday, September 23, 2015 at 5:21:04 PM UTC-4, luisza14 wrote:
>
> I suggest you to create a custom admin site for your external user
>
> How technical are your users?
Not very technical, necessarily. They're normal end-users.
What are your security constraints?
We're in the medical industry, so security is a key consideration for us in
general. I think the main concerns about Django admin specifically were
that it encompas
I suggest you to create a custom admin site for your external user where
you expose only the models that interact with the external user and create
a middleware for forbidden access to the other admin site.
2015-09-23 14:49 GMT-06:00 Bill Freeman :
> How technical are your users?
> What are your
If you have a system based on Django (some CMS for example), rather than an
app for folks to add to a site that has a lot of unrelated stuff, then
sure, generate one, but don't replace one that may have hours of
customization work into it. Let the site owner/tech do the merging. If
there are no s
Hi,
Sure, but why not auto-generate the setting file?, for example I know
various CMS than have an installer that provide a custom setting with
auto-generate configuration file (I don't know how to do that).
Other idea is that my app can add configuration if is not set explicitly,
so the user hav
When today's date is entered in the form it shows a form error saying
that this date (today) is in the future.
What is wrong with the validator I'm using to allow dates until today?
models.py
...
import datetime
...
class SolicitudBase(models.Model):
fecha =
models.DateField(
How technical are your users?
What are your security constraints?
How much work can you do to make it "pretty"? (Believe me, someone will
ask.)
Are there fields that you want to administer internally but don't want to
expose to the users?
Will your users object if you decide to move to a newer Dja
Hello! I just had a fairly lengthy conversation with my colleagues about
whether or not Django admin is well-suited to external users outside our
company. I took the position that for certain use-cases, exposing Django
admin to third parties makes a lot of sense, given that the admin
applicatio
As Remco said your problem are with your pattern because starts with $ or
have ^*$*
[projectname]/
├── [projectname]/
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py <-- The error is here
│ └── wsgi.py
└── manage.py
└── blog/
└── __init__.py
└── models.py
└──
Dear Luis,
As you said, i tried but can't success.
Thanks in advance
Sankar B
On Wed, Sep 23, 2015 at 12:29 AM, Luis Zárate wrote:
>
> 2015-09-22 12:48 GMT-06:00 sankar vasu :
>
>> {{ post.title
>> }}
>
>
> try:
>
> {{ post.title }}
>
> If not found then check your project url.py , do you have
I would be upset to find an app that I installed fiddling with my project
settings.
On Wed, Sep 23, 2015 at 12:53 PM, Luis Zárate wrote:
> Hi,
>
> l have an app than need other apps to run well, I create a requirements
> file and setup file and insert the required apps in my settings, also
> inc
Hi,
l have an app than need other apps to run well, I create a requirements
file and setup file and insert the required apps in my settings, also
include my custom configurations.
I want to build the settings file automatically (with installer script) or
when the user put my app in his installed_
I had the same problem with 1.8, l solved editing with external program
called poedit. I don't know why django build wrong po file, but when
compile the translation is not complete.
El miércoles, 23 de septiembre de 2015, PyMan
escribió:
> Oh shame on me! I had this problem may years ago.here
Oh shame on me! I had this problem may years ago.here I go with the
ugettext_lazy
http://stackoverflow.com/questions/2694798/django-form-and-i18n/2694847#2694847
Il giorno mercoledì 23 settembre 2015 14:23:38 UTC+2, PyMan ha scritto:
>
> Hi,
> I'm using django 1.8.4 with these settings
Hi,
I'm using django 1.8.4 with these settings
LANGUAGE_CODE = 'en'
ugettext = lambda s: s
LANGUAGES = (
('it', ugettext('LANG_ITALIANO')),
('en', ugettext('LANG_INGLESE')),
)
LOCALE_PATHS = (
'C:/path1/locale',
'C:/path2/locale',
)
In b
Here's an article that might help:
https://www.jetbrains.com/pycharm/help/run-debug-configuration-django-test.html
Also PDB,the python debugger does a very good job of debuuging your Django
App.
In case you've never used pdb,this should get you started:
https://gimmebar-assets.s3.amazonaws.com/4fe
ANNOUNCING
eGenix.com mxODBC Connect
Remote Python Database Interface
Version 2.1.4
mxODBC Connect is our commercially supported client-server product
I have tried to
follow
https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#a-full-example
and i get an error:
django.contrib.admin.sites.AlreadyRegistered: The model CustomUser is
already registered
--
You received this message because you are subscribed to the Google Groups
"Dja
I am sorry if this is a duplicate. I did post the same on Django REST
Framework. I was not sure where I should post this.
I am trying to add some custom fields to oauth2. I am using python 3.4 and
django 1.8.
I am having varying errors. But with the combination I got below, the error
I get is
24 matches
Mail list logo