>     featured_place = models.ForeignKey(Place, null=true, blank=true)

1. By any chance are you getting an error like "NameError: name 'true'
is not defined"? The python keyword is "True", not "true".

2. If you reference a mode before it is defined, you need to supply a
string for the referenced model.
   e.g., featured_place = models.ForeignKey('Place', null=True,
blank=True)
   This only works for forward references to models in the same
models.py file.

3. Regarding your error 'null value in column "featured_id" violates
not-null constraint'.
    You may have added null=True in your ForeignKey declaration, you
may even have tried to do a ./manage.py syncdb, but that won't affect
your DB. Once a table exists, django will not ALTER it to match your
new description. You have two choices:
     a. Modify your DB directly using whatever tool you use -- command
line, phpMyAdmin, or whatever.
     b. Do a ./manage.py reset <app_name>. WARNING: this will drop the
tables (and their data) for *all* of the models in the named app, and
then create them anew with the current definitions.

  HTH,
  Peter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to