Tuesday, April 27, 2010

odering User in a form

Hi,

I've this model:

class Pubblicazioni(models.Model):
anno = models.DateField(blank=True, null=True,default=datetime.date.today)
autori = models.CharField(max_length=500)
titolo = models.CharField(max_length=500)
autori_daf = models.ManyToManyField(User)

I need to ordering (by the User.last_name) the field 'autori_daf'
when it is displayed at the form generated by

class PubblicazioniForm(ModelForm):
class Meta:
model = Pubblicazioni

Thanks,

Alfredo

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate