On Monday 22 December 2008 10:36:02 Asheesh Laroia wrote:
> On Mon, 22 Dec 2008, Asheesh Laroia wrote:
> > IntegrityError: pootle_app_pootleprofile.ui_lang_id may not be NULL
> >
> >     ui_lang         = models.ForeignKey('Language', blank=True)
>
> zejn again to the rescue; he points out it should be:
>
> ui_lang         = models.ForeignKey('Language', blank=True, null=True)
>
> Would y'all Pootlers accept such a change to pootle_app/profile.py:39 so
> that initdb.py executes?  I admit that I haven't looked into the deeper
> ramifications of such a change.
>
> -- Asheesh.

The blank=True is usually used for fields, that can be set programatically, 
eg. (I'm making this up) having a html enabled comment and saving it without 
html in another field. The null=True means that the value in the database is 
optional. However, for this to work properly you need both blank=True and 
null=True, otherwise Django raises an error as far as I remember.

Regards,
Gasper


------------------------------------------------------------------------------
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to