On 3/26/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
>
> I would like to change the table of a model on the fly.
> I was looking into the Manager code, but since the get_query_set()
> method in there uses the model as is, changing the
> model._meta.db_table would most probably change the db_table for all
> users/threads, not only for the current one, right?
>
> Any ideas on how this could be achieved?

just a quick thought: did you consider supplying db_table as a lazy
object that would evaluate to string based on current locale (which it
would obtain from thread locals)? I didn't check the code if this is
even possible, but it's just python, so it should....

>
> The main reason I need this is that I want to have a transparent model
> that switches the underlying language (the according DB table it
> should work on) on the fly, so i can keep hacking away without
> language switching before every access via my model.
>
> --
> cu
>
> Wolfram
>
> >
>


-- 
Honza Kr�l
E-Mail: [EMAIL PROTECTED]
ICQ#:   107471613
Phone:  +420 606 678585

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to