On 13 June 2012 09:16, Luke Plant wrote:
> = Option 2: Deprecate Meta.exclude, but still allow a missing
> Meta.fields attribute to indicate that all fields should be editable.
>
> The policy here is essentially this: if any fields the model are
> sensitive, assume all are potentially, and requir
Sorry this is quite late on this thread, but I hadn't noticed any answer for
it.
How about:
from django import forms
class MyNullBooleanField(forms.NullBooleanField):
def clean(self, value):
if value is None:
raise forms.ValidationError('Choose either Yes or No.')
You could always use a proxy model instead of monkey patching.
class MyUser(User):
class Meta:
proxy = True
ordering = ('first_name', 'last_name')
def __unicode__(self):
return self.get_full_name()
Then in any models you define a FK to User, just FK to MyUser instead.
On Fri, May
I really don't see how your YAML file is any more maintainable than Django's
settings.py approach? If anything, I would argue that it is less
maintainable, as you would have to maintain not only your YAML files moving
forward, but also the code which transposes it into a settings.py.
On Wed, Mar 1
That's interesting, I'm of the other belief... I find the Django
documentation to be thorough and organised very well.
One of the main reasons I (and I am sure countless others) even started
using Django was because of it's excellent documentation.
As the project has matured from version 0.96 onw
There is already a ticket for this (and possibly others).
http://code.djangoproject.com/ticket/11244#comment:4
It has been closed and marked wontfix, see the comments for why.
On 15 Feb 2010, at 21:53, orokusaki wrote:
Please visit the following URL, and when you do, put your focus into
the
>
> The correct exception is risen when you try to save it:
>
> >>> t.save()
> Traceback (most recent call last):
> ...
> IntegrityError: 20100212_thing.owner_id may not be NULL
>
> How can you not understand that the DoesNotExist exception above is
> risen too early? It is a bug!
>
Are you sa
>
> Yes, that definitely falls into the category of relying on an
> implementation detail, rather than something that should be mentioned
> as a backwards incompatibility. At the level of inspecting code
> objects (which is essentially what your code was doing), almost any
> change is backwards in