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 =
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
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 =
>
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
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
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
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
7 matches
Mail list logo