On Tue, Jul 12, 2011 at 2:51 PM, Brent <brentba...@gmail.com> wrote: > Hi, > > Does anyone know of a simple, working example of custom user profile > fields? > > I want to have a custom field, say, "favorite color," which is unique > to each user. Then I want users to be able to login, and be taken to a > page called "profile" that displays that custom field. > > So far, I have logging in working, and I can display built-in fields > like username and email, but I am not able to get the custom fields > working. >
This is probably because you're looking at a ModelForm for the User model, when you should have two different ModelForms, one for User and one for UserProfile, run validation on each and save each separately. Or have just one Form which implements its own save() method (which is basically the only relevant difference between Forms and ModelForms). Following tutorials have been informative, but after reading every > tutorial I could get my hands on, I still receive errors like "no such > table" or "SiteProfileNotAvailable" or just syntax errors. I've > invested a significant amount of time into learning Django, but I am > starting to consider switching to another product. > > Thanks in advance. > The learning curve can be steep at first, but once you get the gist of it it becomes a breeze (and a pleasure) to develop for Django. I have to ask, though: how familiar are you with Python? Trying to learn both at the same time can be quite daunting and it is very recommended that you play around with python for at least a couple of months before jumping into django. At the same time, applications like django-registration and django-profiles exist precisely so that you don't have to reinvent the wheel. I personally don't use them, but a lot of people do. Other developers also recommend Pinax, which I personally have never used (I mostly build intranet websites), but it can be quite the tool depending on your project's goals. Cheers, André -- 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.