Hi all,

I'm creating basic user profile functionality.  I have a class,
UserProfileForm, that extends ModelForm, and this is great.  I can add
a piece of data (e.g., favorite candy bar) to the UserProfile model,
and I don't have to make any changes to the UserProfileForm or the
corresponding template in order to get "Favorite candy bar" to appear
on the form.  This is great, adheres to DRY, yada yada yada.

User A may edit his profile using a UserProfileForm, but User B will
have to view User A's profile through a completely separate view,
template, etc.

Now, here is my problem.  What's the best way to create the "view-
only, non-form" template and view for simply viewing other people's
profiles?  I want to repeat myself as little as possible.  For
example, if I eventually decide to add "Favorite candy bar" to a
user's profile, then I shouldn't have to go into any templates to add
a corresponding row- it should read my mind.

I hope this question is somewhat clear.  I imagine many people must
have run into similar problems.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to