On Wed, Feb 11, 2009 at 1:36 PM, phoebebright <phoebebright...@gmail.com>wrote:

>
> I am following the instructions at the bottom of this page
>
> http://docs.djangoproject.com/en/dev/topics/db/models/#inheritance-and-reverse-relations
> and here
> http://docs.djangoproject.com/en/dev/ref/models/fields/#onetoonefield
>
> I have a parent class Directory and a child classes Business, Tourism
> and Community.  The child classes have a subcategory that I want to be
> able to access from a listing of Directory.  My reading of the
> documentation was that by defining a onetoone field with
> parent_link=True I could do this, but on going into Admin and trying
> to add a new entry to Business I immediately get the error Cannot
> assign None: "Business.id" does not allow null values.
>
> Where is my error (again......):
>

I cannot recreate any error using my own models based on the snippets you've
provided, so it seems you've left out some key part of your config that is
causing what you are seeing.  Perhaps post your models.py and admin.py files
on someplace like dpaste?  Also please state exactly what level of Django
you are using?

Karen

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to