I have a case where I have a lot of django sites(partially with the
same code) must run in a single mysql database

in order to avoid conflicts  in django.auth, content-types and other
models tables for them must have unique prefix (since this data must
be isolated for each site)

Currently there is no way to set global(or per application) table
prefix (and all tickets that asked for this closed as invalid)

search in this groups gives nothing
So my question - was global table prefix for tables  considered ?

and what is the way of doing this without this option(setting) in
framework ?


The only way I currently see is : handle "class_prepared" signal and
manually add prefix to table name :


from django.db.models.signals import class_prepared

def handle(sender, *args, **kwargs):
    sender._meta.db_table = PREFIX + sender._meta.db_table

class_prepared.connect(handle)


BUT documentation says that class_prepard for internal only and
framework users should not use it?

is there any other option ?

-- 
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 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to