Hi,
I'm using newforms-admin r6399 and don't understand how sorting by
ForeignKey works in the admin site.

consider this:

class Box(models.Model):
    serial = models.CharField(max_length=25, primary_key=True)
    group = models.ForeignKey(Group)
    force_fw = models.ForeignKey(release.Firmware,
related_name='force_fw', blank=True, null=True)
    blocked = models.BooleanField(default=False)
    reported_fw = models.ForeignKey(release.Firmware,
related_name='reported_fw', blank=True, null=True)
    reported_time = models.DateTimeField(blank=True, null=True)
    reported_ip = models.IPAddressField(blank=True, null=True, default=None)

If i set force_fw to "blank=True, null=True" (optional field to store
as NULL if not given), i cannot sort by this field in the admin page.
If i set it to "blank=True" the admin page only shows entries with a
non-null force_fw.

Any idea?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to