I'm trying to populate an admin form with the field names of of a model class, but I don't want to have to instantiate that model just to read it's fields from _meta.
I basically want to do something like this: self.fields['sort_by'].choices = [(field.verbose_name, field.name) for field in field_list] field_list would be the equivalent to model_instance._meta.fields, but without requiring the model instance. I know I could just grab an instance of the model from the database, but I'd like this to work even if there are no instances currently saved. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---