#2280: Models, that have not obligatory many-to-one relationships and have no
related model set, are not listed.
---------------------------------------------------------+------------------
Reporter: Aidas Bendoraitis <[EMAIL PROTECTED]> | Owner: adrian
Type: defect | Status: new
Priority: high | Milestone:
Component: Admin interface | Version: SVN
Severity: critical | Resolution:
Keywords: |
---------------------------------------------------------+------------------
Comment (by Aidas Bendoraitis <[EMAIL PROTECTED]>):
OK. Here is a simple example. Let's say we have models Occupation and
Person, where one Person can have one Occupation, and one Occupation can
be taken by many People (Persons). Our models would look like this in the
code:
{{{
from django.db import models
class Occupation(models.Model):
title = models.CharField(maxlength=200)
class Admin:
pass
class Person(models.Model):
occupation = ForeignKey(Occupation, blank=True)
name = models.CharField(maxlength=200)
class Admin:
pass
}}}
Then we create Occupations
* "Programmer"
* "Manager"
* "Designer"
and Persons
* "Mr. Smith" who is a "Manager"
* "Tom Anderson" who is a "Programmer"
* "Trinity", who has no Occupation.
Now if we go to http://example.com/admin/myapp/person/, we will get only
"Mr. Smith" and "Tom Anderson" listed, because they have their Occupations
set. And that is an error I am reporting.
--
Ticket URL: <http://code.djangoproject.com/ticket/2280>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---