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_mysql for Apache authentication and I want to use that against the Django auth system. For reasons I won't go into here I cannot use the recommended way of authenticating a user directly against the django auth database (having mostly to do with outdated mod_python packages in my distro etc.).

So I'd like to ask if there's any mechanism of "intersecting" when a user is updated through the admin interface. What I will need to store in my UserProfile table is the "pure" SHA-1 hash of the user to enable mod_auth_mysql to use that field (it won't understand the alg$seed$hash syntax used in the django user table.

So I would of course like to do this transparently, by intersepting both create user and update user queries where I get the password in plaintext and put the pure hash in my database. Other than that I want the exact same behavior of what the auth system in django does right now.

Can anybody think of a way of accomplishing this? Am I destined to have to duplicate and modify my own version of the django user administration interface/handler layer? What is in your oppinion the least painful (as in duplication of code) way of accomplishing this?

Kind regards, Stefan Freyr.

On 10/13/06, Dirk Eschler <[EMAIL PROTECTED]> wrote:

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 there something you are trying to do that isn't accomplished by
> that method?

Thanks for the quick response. And sorry for not being more precise. I haven't
tried it yet. Just wanted to be sure, that the article doesn't refer to an
obsolete version of Django. It mentioned that things might change in future
releases, model subclassing in particular.

Best Regards,
Dirk Eschler

--
Dirk Eschler <mailto:[EMAIL PROTECTED]>
http://www.krusader.org



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

Reply via email to