Re: Django User (auth) question
Front end validation doesn't always work like it is supposed to so you shouldn't really rely on it. On Mon, Aug 1, 2011 at 6:09 AM, lokeshwrote: > hi, > i think Best way is front end validation. instead of modifying auth > models. > lokesh s > > > > On Aug 1, 12:43 pm, bruno desthuilliers > wrote: > > On Aug 1, 7:28 am, James DeMichele wrote: > > > > > Hello, > > > > > I have a question about tweaking the django.contrib.auth.models.User > class. > > > I noticed that Django doesn't allow for overriding of attributes of > "Field" > > > instances, such as "email" or "first name". Yet, I'd like to my email > and > > > first name fields to be required and I'd also like to have my email > Field be > > > unique. What is the recommended way to achieve this? > > > > Unless you want to add this as database-level constraints (in which > > case you have few choices except forking contrib.auth), the obvious > > solution is to provide your own forms (front-end and/or admin) and add > > the desired checks / validations there. > > -- > 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. > > -- http://www.theboxery.com -- -- 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.
Re: Django User (auth) question
Awesome, that's the way I'm going about it. Thanks for the responses. -James On Mon, Aug 1, 2011 at 5:09 AM, lokeshwrote: > hi, > i think Best way is front end validation. instead of modifying auth > models. > lokesh s > > > > On Aug 1, 12:43 pm, bruno desthuilliers > wrote: > > On Aug 1, 7:28 am, James DeMichele wrote: > > > > > Hello, > > > > > I have a question about tweaking the django.contrib.auth.models.User > class. > > > I noticed that Django doesn't allow for overriding of attributes of > "Field" > > > instances, such as "email" or "first name". Yet, I'd like to my email > and > > > first name fields to be required and I'd also like to have my email > Field be > > > unique. What is the recommended way to achieve this? > > > > Unless you want to add this as database-level constraints (in which > > case you have few choices except forking contrib.auth), the obvious > > solution is to provide your own forms (front-end and/or admin) and add > > the desired checks / validations there. > > -- > 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. > > -- 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.
Re: Django User (auth) question
hi, i think Best way is front end validation. instead of modifying auth models. lokesh s On Aug 1, 12:43 pm, bruno desthuillierswrote: > On Aug 1, 7:28 am, James DeMichele wrote: > > > Hello, > > > I have a question about tweaking the django.contrib.auth.models.User class. > > I noticed that Django doesn't allow for overriding of attributes of "Field" > > instances, such as "email" or "first name". Yet, I'd like to my email and > > first name fields to be required and I'd also like to have my email Field be > > unique. What is the recommended way to achieve this? > > Unless you want to add this as database-level constraints (in which > case you have few choices except forking contrib.auth), the obvious > solution is to provide your own forms (front-end and/or admin) and add > the desired checks / validations there. -- 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.
Re: Django User (auth) question
On Aug 1, 7:28 am, James DeMichelewrote: > Hello, > > I have a question about tweaking the django.contrib.auth.models.User class. > I noticed that Django doesn't allow for overriding of attributes of "Field" > instances, such as "email" or "first name". Yet, I'd like to my email and > first name fields to be required and I'd also like to have my email Field be > unique. What is the recommended way to achieve this? Unless you want to add this as database-level constraints (in which case you have few choices except forking contrib.auth), the obvious solution is to provide your own forms (front-end and/or admin) and add the desired checks / validations there. -- 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.