I'm looking for the same, but I want to "override" __str__ in class
User to return something other that username. One thing comes to my
mind, would it be possible to change the object's method in some
signal hook (i.e. class_prepared)? I don't have Django handy so I
cann't check for now by myself...

On 9 Paź, 15:05, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to modify User.get_profile(), that it creates
> a new profile, if does not exist.
>
> I don't want to modify the django source for me. One solution would
> be, to replace this method in a middleware for every request.
> But that's not a nice solution.
>
> Subclassing could be done, too. But I need to modify a lot of
> import statements.
>
> 1. Is this usefull for all django users? Then I would write
> a patch.
>
> 2. How can you exchange the method without modifying django?
>
>  Thomas


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to