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
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
>
>
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
>
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
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
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:
>
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
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
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
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 =
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
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)
>
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 =
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
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
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
> 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
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(
>
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):
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
> 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
>
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
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
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 =
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.
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
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
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
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
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
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
31 matches
Mail list logo