Re: Using models from another project/site
You are some kind of wonderful. Thanks for that, it has really helped me! \d --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Using models from another project/site
On Sat, Sep 13, 2008 at 8:00 AM, Donn <[EMAIL PROTECTED]> wrote: > > Extra info: > > I have many Projects that equate to 'websites'. > Each has it's own database in Mysql. > > I want one Project to be our Admin that let's us set some stuff that the > other > websites (projects) read and act upon. (Hence OP needing to access a model > from another Project) > > If I setup each "website" as an Application (under our Admin Project) then > they will all use the same Mysql database. I need a database per client. > > So, any clues ? > So you want multiple database support, which in general Django doesn't yet have. There's a big thread over on the developer's list on this topic right now. If all your databases are on the same server, though, it might be that Django will already do what you are looking for, see this message: http://groups.google.com/group/django-developers/msg/05420313676f4693 Karen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Using models from another project/site
Extra info: I have many Projects that equate to 'websites'. Each has it's own database in Mysql. I want one Project to be our Admin that let's us set some stuff that the other websites (projects) read and act upon. (Hence OP needing to access a model from another Project) If I setup each "website" as an Application (under our Admin Project) then they will all use the same Mysql database. I need a database per client. So, any clues ? \d --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using models from another project/site
I am getting confused by terms, but this is the basic need: 1. In a base dir I have site1 and site2 2. I am in site2 (views) and I want to use the models defined in site1 3. from site1.models import Blah -- seems to work without error. 4. I get an error on stuff like this: p = Blah.objects.all() for i in p <--- error here is: "Table 'site2.site1_blah' doesn't exist") BTW: I have this kind of thing in Apache: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE site2.settings PythonOption django.root /site2 PythonDebug On PythonInterpreter site2 PythonPath "['/path/to/base'] + sys.path" How do I set things up so I can use 'foreign' models? \d --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---