Re: Model Basics
On 2/28/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Yeah, we talked about this on Sunday at the Django sprint. The > tentative plan is to introduce a CurrentUserField which is > special-cased in the admin logic. How would this be handled in user code? How would Manipulators deal with these, ie, would Manipulators have to start taking request.user in addition to request.POST? (I'm assuming you've put thought into how this will effect the proposed changes to Automatic Manipulators, as well?) In particular, I have a couple of Models that are created updated during the save() of other Models (ChangeLogs and Changes) and I realize this is a special case, but is there any good way to have have CurrentUser information available to something like the save() without tying it to only the Admin (ie, still allowing custom forms or shell-based modifications)? (On a side note, I could use the ability to have custom non-Model-Fields (ie, not persisted in the database, only used in the save() ChangeLog generation) in the Admin, is there an existing way to do this?) -- --Max Battcher-- http://www.worldmaker.net/ All progress is based upon a universal innate desire on the part of every organism to live beyond its income. --Samuel Butler --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Model Basics
On 2/28/06, DaveW <[EMAIL PROTECTED]> wrote: > I see that ticket #1268 has been closed as WontFix - threadlocal is > felt to be to heavyweight a solution. Unfortunately, some mechanism for > this is going to be needed for Django to be used in many corporate > environments - has anyone had any other thoughts about how to implement > this? Yeah, we talked about this on Sunday at the Django sprint. The tentative plan is to introduce a CurrentUserField which is special-cased in the admin logic. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.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 -~--~~~~--~~--~--~---
Re: Model Basics
I see that ticket #1268 has been closed as WontFix - threadlocal is felt to be to heavyweight a solution. Unfortunately, some mechanism for this is going to be needed for Django to be used in many corporate environments - has anyone had any other thoughts about how to implement this? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Model Basics
Thanks, I wasnt sure from the documentation if subclassing would do a "inheritance" DB thing like many ORM tools support, or simply combine the two classes as I was hoping for.
Re: Model Basics
2006/2/12, ChaosKCW <[EMAIL PROTECTED]>: > 1) can you access the session user object from the model _pre_save no see http://code.djangoproject.com/ticket/1268 though > 2) can you subclass a model. yes see the docs (either on www.djangoproject.com/documentation or the wiki on code.djangoproject.com) -- Brice Carpentier aka Br|ce
Re: Model Basics
PS the project and app level DB would also allow for creater scalablity and better seperation of concerns. One last question, is it possible to add a glboal hook into the ORM layer ala SOX requiremens i the USA. To proide an audit of any transaction ?