Hi Karen, Thanks for the pointer. I started looking as suggested, and found an interesting link on the issue: http://groups.google.com.mx/group/django-users/browse_thread/thread/bddbc4c71e8298ef/3d367268d297e89c?lnk=gst&q=%22ForeignKey%22+and+%22ordering%22#3d367268d297e89c
The above, makes me look into te details and understadn how vague my question was. Still, I do not know how to do the following: How can I configure my UserProfile metadata in order to order the data in accordance to the User table fields (first_name, last_name), which are pointed to by a ForeignKey in UserProfile (user). Thank's/Fco On Mar 28, 12:31 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 12:42 PM, Francisco Benavides < > > [EMAIL PROTECTED]> wrote: > > > Hi, > > > I have created a User profile, pointing to the User table, as per the > > documentation; how can I access the User fields from the UserProfile > > so I can place that in the metadata class? > > > userprofile.models.py > >http://dpaste.com/41831/ > > Your question is vague, so I'm not sure what you are asking. If you've got > something that isn't working it helps people to help you if you tell them > what the symptoms are of its not working. In this case looking at your > model I'm guessing the ordering you are trying to specify isn't ordering the > way you expect or is throwing an error. Ordering by related fields is, I > believe, a bit fragile in trunk (to be improved when queryset-refactor is > merged), but it might work for a simple relation. I think it involves > specifying the table name for the related field, but I don't recall the > details. You might try searching on "ForeignKey" and "ordering" on this > list and you should find some pointers for how to do it. If your problem > relates to something else please provide more details. > > Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---