Re: Extending the user model and accessing fields in template context

2017-06-07 Thread Bernd Wechner
Why thank you Melvyn, nailed it one. I had assumed there was a profile connected but alas it was not set ... once I set it, the template access through the dot notation to the profile works fine. It is the silent exception being ignored that threw me guess. Arguably appropriate response to a

Re: Extending the user model and accessing fields in template context

2017-06-07 Thread Melvyn Sopacua
On Thursday 08 June 2017 08:46:38 Bernd Wechner wrote: > Have failed to find an easy answer to this so will lazily ask the > broader community before I retire tonight ;-). > > I have a model that I use to extend the User model like yo: > > from django.contrib.auth.models import User > >

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Carl Meyer
Hi Tobias, On 11/18/2014 11:44 AM, Tobias Dacoir wrote: > Dear Daniel and Carl, > > thanks for your advice. However I'm a bit confused now. So in general > you recommend that I follow the guide for substituting my own custom > model but at the same time Carl is warning me that overwriting >

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Tobias Dacoir
Dear Daniel and Carl, thanks for your advice. However I'm a bit confused now. So in general you recommend that I follow the guide for substituting my own custom model but at the same time Carl is warning me that overwriting AUTH_USER_MODEL is quite painful for an existing application (right

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Carl Meyer
Hi Tobias & Daniel, On 11/18/2014 09:10 AM, Daniel Roseman wrote: > On Tuesday, 18 November 2014 15:04:19 UTC, Tobias Dacoir wrote: > > I'm trying to figure out how to create my Custom User Model. > > In the official docs I basically found two different strategies: > Extending User

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Daniel Roseman
On Tuesday, 18 November 2014 15:04:19 UTC, Tobias Dacoir wrote: > > I'm trying to figure out how to create my Custom User Model. > > In the official docs I basically found two different strategies: Extending > User Model or Custom User Model: >

Re: Extending Django User model using add_to_class()

2009-06-22 Thread James Bennett
On Mon, Jun 22, 2009 at 5:30 PM, pr wrote: > Yes, I know what you mean, but It's small project with one programmer. > I want to know about speed and stability in production mode above > rules of 'programming-tao' :-) Well, there's also the fact that: 1. Using a profile means

Re: Extending Django User model using add_to_class()

2009-06-22 Thread pr
On 22 Cze, 23:14, James Bennett wrote: > No, it's a very bad method. Consider what happens if two people want > to add fields of the same name; trying to stick them in the User model > will obviously fail and break at least one person's code. Yes, I know what you mean, but

Re: Extending Django User model using add_to_class()

2009-06-22 Thread James Bennett
On Mon, Jun 22, 2009 at 4:01 PM, pr wrote: > Is it a good way to extend Django User model using add_to_class()? > I have to add only two extra fields to the User model and I think that > using Profile Model to do this is unnecessary. No, it's a very bad method. Consider what

Re: Extending the User model

2009-02-09 Thread Malcolm Tredinnick
On Sun, 2009-02-08 at 12:16 -0800, Patricio Palma wrote: > Greetings > > I've a model > class MyUser(auth.User): > location = meta.CharField(maxlength=100, blank=True) > > class META: > replaces_module = 'auth.users' > admin = meta.Admin( > list_display =

Re: Extending the User model

2009-02-09 Thread Patricio Palma
Thanks, I owe you a chocolate bar I fix it class MyUser(User): chilean_rut = CLRutField(_('RUT'),unique=True) some_field = models.CharField(max_length=50) voalá I don't really need a PK, my mistake Thanks again. --~--~-~--~~~---~--~~ You received this

Re: Extending the User model

2009-02-09 Thread Karen Tracey
On Sun, Feb 8, 2009 at 7:51 PM, Patricio Palma wrote: > [snip] > --- > models.py > from django.contrib.auth.models import User > class MyUser(User): >chilean_rut = CLRutField(_('RUT'),primary_key=True) >

Re: Extending the User model

2009-02-08 Thread Patricio Palma
Yeah you're right I can't believe that I mix the admin settings in the class, for a short explanation. my code: --- models.py from django.contrib.auth.models import User class MyUser(User): chilean_rut =

Re: Extending the User model

2009-02-08 Thread Karen Tracey
On Sun, Feb 8, 2009 at 5:33 PM, Patricio Palma wrote: > > At revision 9820. > > ??? > ??? indeed. What doc are you reading that suggests having something like "admin = meta.Admin(..." under class Meta of your model definition? I've never seen anything like it but

Re: Extending the User model

2009-02-08 Thread Patricio Palma
At revision 9820. ??? --~--~-~--~~~---~--~~ 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

Re: Extending the User model

2009-02-08 Thread Daniel Roseman
On Feb 8, 9:06 pm, Patricio Palma wrote: > > This code looks exceptionally old, admin = meta.Admin() has been gone for > > several years, what version of django are you workign with? > > 1.1 pre-alpha > I 've in admin.py file, the main idea was show the list_display

Re: Extending the User model

2009-02-08 Thread Patricio Palma
> This code looks exceptionally old, admin = meta.Admin() has been gone for > several years, what version of django are you workign with? > 1.1 pre-alpha I 've in admin.py file, the main idea was show the list_display field setted --~--~-~--~~~---~--~~ You

Re: Extending the User model

2009-02-08 Thread Alex Gaynor
On Sun, Feb 8, 2009 at 3:06 PM, Patricio Palma wrote: > > Greetings > > I have a model > > from django.contrib.auth.models import User > class MyUser(User): > >chilean_rut = CLRutField(_('RUT'),primary_key=True) > >class Meta: > > admin = meta.Admin( >

Re: Extending the User Model with Inheritance | How to save extended data

2008-11-10 Thread johan.uhIe
So I have just had a try with a new written UserManager and it works. My model looks the following way now: from django.db import models from django.contrib.auth.models import User, UserManager import datetime class NewUserManager(models.Manager):

Re: Extending the User model

2008-10-17 Thread krylatij
Take a look at http://code.google.com/p/django-profile/ --~--~-~--~~~---~--~~ 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

Re: Extending the User model

2008-10-17 Thread Ulises
> AFAICT, there's some work going on to allow to replace the default > User model with a custom one. But so far, the recommended solution is > indeed to use a UserProfile. Else, there's the hackish (IOW : *not* > recommended) solution - monkeypatching the User model >

Re: Extending the User model

2008-10-17 Thread bruno desthuilliers
On 17 oct, 05:30, jeffself <[EMAIL PROTECTED]> wrote: > I'm working on an application that will need data entry from many > users. The users belong to various departments in the organization > and the information that gets entered by each user should contain the > department information. The

Re: extending the User Model error

2007-05-05 Thread *San*
It works, yay Thanks heaps On May 5, 5:12 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 5/4/07, *San* <[EMAIL PROTECTED]> wrote: > > > but, when I tried to view it, I got an error: > > Cannot resolve keyword 'user' into field > > The field on your profile model **must** be named

Re: extending the User Model error

2007-05-04 Thread James Bennett
On 5/4/07, *San* <[EMAIL PROTECTED]> wrote: > but, when I tried to view it, I got an error: > Cannot resolve keyword 'user' into field The field on your profile model **must** be named "user". So, for example, this will work: class MyProfile(models.Model): mailing_address =

Re: Extending the User model

2007-04-19 Thread Oliver Charles
I suppose the best bet, in an ideal world, world be model inheritance. As you're probably aware, this is incomplete at the moment, so you can't really do that. A better solution may be to have a wrapper model, and have your Buyer/Seller classes create one to one relationship this extension class.

Re: Extending the user model

2006-10-15 Thread Pitmairen
I have extended the user model like this, but when i edit something in the admin, the userprofile associated with that user gets deleted. Anyone know how i can prevent this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Extending the user model

2006-10-13 Thread Stefán Freyr Stefánsson
Sorry to "fork" this thread. And thank you to Dirk for pointing out the article and verifying that it is the "right thing to do"(tm).I have to do this as well (that is, enhance the User object a bit) but not quite in the same way as this is intended I believe. The thing is that I'm using

Re: Extending the user model

2006-10-13 Thread Dirk Eschler
Am Freitag, 13. Oktober 2006 13:58 schrieb Malcolm Tredinnick: > Yes. Is there something you are trying to do that isn't accomplished by > that method? Ok now that i have tried, there is indeed something i can't accomplish. :) Here's a simplified version of my model: class

Re: Extending the user model

2006-10-13 Thread Dirk Eschler
Am Freitag, 13. Oktober 2006 13:58 schrieb Malcolm Tredinnick: > On Fri, 2006-10-13 at 13:20 +0200, Dirk Eschler wrote: > > Hello, > > > > is the method described at the below link still the recommended one? > > http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model > > Yes. Is

Re: Extending the user model

2006-10-13 Thread Malcolm Tredinnick
On Fri, 2006-10-13 at 13:20 +0200, Dirk Eschler wrote: > Hello, > > is the method described at the below link still the recommended one? > http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model Yes. Is there something you are trying to do that isn't accomplished by that

Re: Extending the user model raises error: ImproperlyConfigured

2006-07-15 Thread un
Sorry, I found the error myself: I was mistaken concerning the value for my_apps in AUTH_PROFILE_MODULE uli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email