Russell Keith-Magee wrote: > On 7/11/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > >> I am hoping to do something like >> contact = models.ForeignKey(User, list_display = ('first_name', 'last_name') >> ) > > A big -1 on this idea. This mixes the data representation with the > display representation. One of the major reasons for the > newforms-admin rewrite is to avoid mixes like this. >
Personally, I think this is an appropriate place to do what I am doing. it is a central place where an aspect of my app is defined, and that definition can include both the schema and the UI. the UI can be overridden at the instance level, but if there are more than one place this 'default' UI is to be used, this seems like the place to define it. now that I have said all that, I should go look at the newforms-admin thing. so don't get too worked up over my "common place to define everything" desire. > If you want to affect the display of a foreign key, you can (and > should) do it on the form. The default display will be __str__, but > you can easily replace the display list. > Only interested in the admin interface. I am not very far into coding my app, I have been using SVN. sounds like I should start using the newforms-admin? (im quite ok developing with beta code. by the time I am ready to deploy I will know that either my stuff works, or what bugs are pending and then fix them. or something like that.) Carl K --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---