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 l

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 > >

Extending the user model and accessing fields in template context

2017-06-07 Thread Bernd Wechner
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 class Dude(models.Model): nickname = models.CharField('Nickname

Re: django-registration: extending the user model

2013-10-07 Thread N8
If you mean that the User model doesnt have fields you may want, like telephone or address i.e., the best and easiest way is to use add a UserProfile model with a foreignkey to the User model. Django-profiles is one and it's meant for use with django-registration> https://bitbucket.org/uberno

django-registration: extending the user model

2013-10-06 Thread +Emmanuel
Hi, I am looking for a comprehensive tutorial on how I can extend the default user model using django-registration, specifically for Django 1.5 and django-registration 1.0 Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

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 m

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) > some_field = models.CharField

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 = CLRutField(_('RUT'),primary_key=

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 I've only been around since 0.

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 django-us

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 field > setted That's impossi

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 receive

Extending the User model

2009-02-08 Thread Patricio Palma
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 = ('username', 'email', 'first_name','last_name', 'lacation') )

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( >fields = ( >(_(

Extending the User model

2009-02-08 Thread Patricio Palma
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( fields = ( (_('Personal info'), {'fields': ('first_name', 'last_name', 'chilean_rut','em

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): def

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

2008-11-09 Thread johan.uhIe
Hello People, I'm just getting started with Django and am currently trying to get my head around the User/Authenticating-Backend. I want to save extra data to the User Model so i followed the inheritance way described here: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-w

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 this

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 > http://www.amitu.com/blog/200

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 rea

Extending the User model

2008-10-16 Thread jeffself
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 reason for this is that the users should be able to view and edit

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 "user

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 = models.TextFiel

extending the User Model error

2007-05-04 Thread *San*
I was trying to extend the user model as described here: http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model but, when I tried to view it, I got an error: Cannot resolve keyword 'user' into field Here's my view.py def profile(request, username): uname = User.objects.get

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.

Extending the User model

2007-04-19 Thread checco
Hi, I already posted this question here http://groups.google.com/group/django-users/browse_thread/thread/2dfb6ed2fc99a62e but I then realized I had not been very clear and decided to rewrite it. In this entry from the James Bennet blog http://www.b-list.org/weblog/2006/06/06/django-tips-extendin

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 mod_auth_m

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 UserProfile(models.Mo

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 t

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 method?

Extending the user model

2006-10-13 Thread Dirk Eschler
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 -- Dirk Eschler http://www.krusader.org --~--~-~--~~~---~--~~ You received this messag

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 to

Extending the user model raises error: ImproperlyConfigured

2006-07-15 Thread Ulrich Nitsche
Hi, in need of an extended user model I followed the little tutorial on http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model: 1. I created a model 2. I added AUTH_PROFILE_MODULE ='my_apps.my_model_name' to my setting But when I try to get the data from my extension (like u.