Accessing and sharing data between multiple sites in django from different databases -


I currently have three sites, for example it should be site 1, site 2 and site 3. Each site requires authentication Both site 1 and site 2 take a database, when it has a separate database in the "portfolio" database and site 3, it creates a "Site 3 Specific" database.

I am planning to keep a common account database in order to keep the user's credentials available for all the different sites available so that each site (such as Site 1, Site 2 and Site 3) Use the common account database to authenticate. I am planning to keep the user's details in a separate database because all three sites in development, testing and live environments can share the same user credentials without redundancy. Also, each site may have its own specific data, which we can enter, register or enter in different ways in the development, scaffolding and live environment.

There is also the possibility of sharing some data between sites.

Can anybody please tell me how can I get these works in the Digengo + Apache + Modi Wagsey?

Please enter the shared settings file, model file and URL file globally, then modify the settings files that I share on my global form. Please advise.

We currently work.

Each site has its own VirtualHost entry in httpd.conf , and each app has its own DEJENGO.VSG config file, which looks something like this (you can probably use a simple):

  import os, sys, site, Globe prev_sys_path = list (sys.path) root_dir = os.path. abspath (os.path.join (os.path.dirname (__ Fail__), '..))) Site.addsitedir (glob.glob (os.path.join (root_dir,' venv / lib / python * / site- packages ')) [0]) sys.path.append (' / usr / local / directory sys.path.append to (sys.path) before ( '/ usr / local / django-apps / appName') new_sys_path = []: If Items not prev_sys_path: new_sys_path.append (items) Sys.path.remove (item) sys.path [: 0] = new_sys_path os.environ [ 'DJANGO_SETTINGS_MODULE'] = 'AppName.settings' Import django.core.handlers .wsgi application = django.core.handlers.wsgi.WSGIHandler ()  

Th e virtualhost need to incorporate such entries:

  set Aanvi Dianaanjioanaan $ $ [environmental WSGIDaemon processes Apamej user = Apache group = Apache processes = 2 threads = 15 display-name =% {group} Dbluesjiaiprkriya group Apames WSGIScr IptAlias ​​/ /usr/local/django-apps/AppName/apache/django.wsgi & lt; Directory / usr / local / django-apps / appName / apache & gt; Decline order, & lt; / Directory & gt;  

From there, the database set up depends on the database engine you are using.

Hope it helps.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -