Re: Error while customising Django User

2015-12-21 Thread Web Architect
Hi, Thanks for your suggestion. Will try it out. Thanks. On Saturday, December 19, 2015 at 10:11:48 PM UTC+5:30, Abdoul Aziz Abdoulaye wrote: > > Hello, > You can use django monkey patching for adding additional fields to User > model > > for your case it will look like this. > > User.add_t

Re: Error while customising Django User

2015-12-21 Thread Web Architect
Hi Tim, Thanks for your suggestion. Will go through the documentation and will try it out. Thanks. On Saturday, December 19, 2015 at 9:26:37 PM UTC+5:30, Tim Graham wrote: > > You could use a OneToOneField as described at > https://docs.djangoproject.com/en/stable/topics/auth/customizing/#exte

Re: Error while customising Django User

2015-12-19 Thread Abdoul Aziz Abdoulaye
Hello, You can use django monkey patching for adding additional fields to User model for your case it will look like this. User.add_to_class('user_type', model.IntergerField()) Le vendredi 18 décembre 2015 11:55:16 UTC, Web Architect a écrit : > > Hi, > > I am new to Django and still under t

Re: Error while customising Django User

2015-12-19 Thread Tim Graham
You could use a OneToOneField as described at https://docs.djangoproject.com/en/stable/topics/auth/customizing/#extending-the-existing-user-model On Saturday, December 19, 2015 at 5:12:52 AM UTC-5, Web Architect wrote: > > Hi Tim, > > Thanks for your response and the details. > > In that case, wh

Re: Error while customising Django User

2015-12-19 Thread Web Architect
Hi Tim, Thanks for your response and the details. In that case, what would be the best approach to have additional credentials for the user? Do I need to create another model/table and link it to User? In that case, how will that get included in the User object? Do I need to create a middlewar

Re: Error while customising Django User

2015-12-18 Thread Tim Graham
If you didn't start your project with a custom user, it's non-trivial to start using one. Please see https://code.djangoproject.com/ticket/25313. On Friday, December 18, 2015 at 6:55:16 AM UTC-5, Web Architect wrote: > > Hi, > > I am new to Django and still under the process of learning. We are u

Error while customising Django User

2015-12-18 Thread Web Architect
Hi, I am new to Django and still under the process of learning. We are using an open source ecommerce platform - Oscar - for our online store. Oscar is based on Django. I was trying to customise the Django User model by extending with some few extra fields/columns: # file: your-project/apps/u