Re: alphabetize options in a ForeignKey dropdown?

2008-10-02 Thread Rock
On Oct 2, 2:00 am, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Wiadomość napisana w dniu 2008-10-02, o godz. 01:03, przez Rock: > > > Have you tried setting the order within your model? I think that is > > the only simple way to tackle this at this time. > > >    class Meta: > >        ordering =

Re: alphabetize options in a ForeignKey dropdown?

2008-10-02 Thread webcomm
Thanks James. That did the trick. --~--~-~--~~~---~--~~ 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

Re: alphabetize options in a ForeignKey dropdown?

2008-10-02 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-02, o godz. 09:11, przez James Bennett: >> Anyway, I seem to be unable to change ordering of FKs relating to >> User >> object. Any hint? > > class UserProfileForm(forms.ModelForm): >user = >

Re: alphabetize options in a ForeignKey dropdown?

2008-10-02 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-02, o godz. 01:03, przez Rock: > Have you tried setting the order within your model? I think that is > the only simple way to tackle this at this time. > >class Meta: >ordering = ("fruit",) This will change default ordering across the whole site. To

Re: alphabetize options in a ForeignKey dropdown?

2008-10-02 Thread James Bennett
2008/10/2 Jarek Zgoda <[EMAIL PROTECTED]>: > Anyway, I seem to be unable to change ordering of FKs relating to User > object. Any hint? So, suppose you have the following model, a simple user profile: from django.contrib.auth.models import User from django.db import models class

Re: alphabetize options in a ForeignKey dropdown?

2008-10-01 Thread Rock
Have you tried setting the order within your model? I think that is the only simple way to tackle this at this time. class Meta: ordering = ("fruit",) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

alphabetize options in a ForeignKey dropdown?

2008-10-01 Thread arnold4321
Hi all, In the admin interface, if I want the options in a dropdown for a ForeignKey field to be alphabetized by option rather than ordered by the value (the numeric ID), how would I do that? For example, I want something like this... - Apples Bananas Grapes Oranges ...instead of