I'm sure this is easily answered, but so far the solution has evaded
me.

I have a table in my model definition eg:
----
class Transaction(models.Model):
 
user=models.ForeignKey(UserProfile,edit_inline=models.TABULAR,num_extra_on_change=0)
    description=models.CharField(maxlength=200,help_text="description
of 200 characters")
 
points_type=models.ForeignKey(PointType,default='standard',blank=True,core=True)
    date=models.DateTimeField(blank=True, null=True)
    def __str__(self):
        return "%s" % self.user
    def eventtype(self):
        return self.get_event_display()
    class Admin:
        list_display=('date','points_type','description','user')
        list_per_page=50
        save_on_top=True
    class Meta:
        verbose_name_plural="User Transactions"
        pass
-----
In the Admin I have the transactions listing by date order with the
latest first, which is just what I want.

However, if I add a new transaction, I want to see the Users listed in
the User ChoiceField by username, rather than userid which it
currently is. I have over 1000 users and so finding the correct user
is a nightmare.

I've played with the ordering attribute in the Meta definition, but
this applies it to the list display and not the Edit record page.

Can anyone suggest how I can order the User select box in the edit
record page?

Any thoughts welcome.

Tim


--~--~---------~--~----~------------~-------~--~----~
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