I have something like this:
class Project(models.Model):
name = models.CharField(maxlength=10)
order = models.IntegerField()
....
def __str__(self): return self.name
class Task(models.Model):
project = models.ForeignKey(Project)
description = models.CharField(maxlength=100)
Is there a way in Admin, when editing Task, to have the Select field for
Project sorted by Project.order (or at least by Project.name) instead of
Project.id?
(The Project.id order looks pretty chaotic, as it reflex the time (id is
AutoField), when the Project was entered, which is surely not too much
descriptive, as many related Projects are entered at very different times)
--
Zdravi
Gilhad
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---