Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-19 Thread Hella Nick
你帮我获得加拿大的工作移民签证,我就可以帮你解决问题。

在 2020年5月17日星期日 UTC+8上午4:51:45,chaitan写道:
>
> Hi, I am facing ModuleNotFoundError in my Django application. It got 
> configured with multiple settings files for production, Development & 
> Testing. 
> When I Try to run Python manage.py runserver --settings= settings_dev_sai. 
>
> This is My *Settings* File:
>
> import socket
>
> #import settings depending on the box we are on
> HOST = socket.gethostname()
> TPA_CODE = "Bridge"
> TPA_NAME = "Bridge Benefits System"
>
> #development
> if HOST == "BITS-DP-LAPTOP":
> from settings_dev import *
> TPA_NAME = "ICBA Benefit Services Ltd."
> TPA_CODE = 'ICBA' 
> #DFG bridge
> elif HOST == "dfginternal":
> from settings_dfg_ees import *
> TPA_NAME = "Dehoney Financial Group"
> TPA_CODE = 'DFG' 
> #test
> elif HOST == "DFGTEST02":
> from settings_staging import *
> elif HOST == "icbaweb":
> from settings_production_icba import *
> TPA_NAME = "ICBA Benefit Services Ltd."
> TPA_CODE = 'ICBA' 
> elif HOST == "meritweb":
> from settings_production_merit import *
> TPA_NAME = "Ontario Construction Industry Benefit Plan"
> TPA_CODE = 'MERIT' 
> elif HOST == "dfgweb" :
> from settings_production_dfg import *
> TPA_NAME = "Dehoney Financial Group"
> TPA_CODE = 'DFG' 
> elif HOST == "dev" or HOST == "j-ubu" :
> from settings_dev_baikal import *
> elif HOST == "jdev" :
> from settings_dev_juliab import *
> elif HOST == "Sai" :
> from settings_dev_sai import *
> elif HOST == "johnstonesweb" :
> from settings_production_johnstones import *
> TPA_NAME = "Johnstone's Benefits"
> TPA_CODE = 'JOHNSTONES' 
> elif HOST == "bridgedemo" :
> from settings_demo import *
> TPA_CODE = "Bridge"
> TPA_NAME = "Bridge Benefits System"
> else:
> raise ImportError("This server's hostname [" + HOST + "] does not have 
> a proper expanded settings file. Please configure one.")
> *
>
> This is my *settings_dev_sai*
>
> from settings_common import *
>
> DEBUG = True
> RUN_TYPE = RUN_DEV
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> #'NAME': 'bridge_icba',
> 'NAME': 'bridge_js',
> #'NAME': 'bridge_dfg_internal',
> #'NAME': 'bridge_dfg',
> 'HOST': 'localhost',
> 'USER': 'django',
> 'PASSWORD': 'bridge_user',
> 'PORT': '',
> },
> }
>
> MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work - 
> Bridge/Projects/bridge/MEDIA/'
> MEDIA_URL = '/media/'
>
> EMAIL_HOST = 'smtp.gmail.com'
> EMAIL_PORT = 587
> EMAIL_HOST_USER = 'bridgeautoma...@gmail.com '
> EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
> EMAIL_USE_TLS = True
> DEFAULT_FROM_EMAIL = 'bridgeautoma...@gmail.com '
>
>
> STATIC_ROOT = ''
> STATIC_URL = '/static/'
> STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work - 
> Bridge/Projects/bridge/static",)
> STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work - 
> Bridge/Projects/bridge/static'
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': ["C:/Users/DavidPiccione/Dropbox/Work - 
> Bridge/Projects/bridge/TEMPLATES",],
> 'APP_DIRS': False,
> 'OPTIONS': {
> 'context_processors': [
> 'django.contrib.auth.context_processors.auth',
> 'django.template.context_processors.debug',
> 'django.template.context_processors.i18n',
> 'django.template.context_processors.media',
> 'django.template.context_processors.static',
> 'django.template.context_processors.tz',
> 'django.template.context_processors.request',
> 'django.contrib.messages.context_processors.messages',
> 'bridge.context_processors.global_settings',],
> },
> },
> ]
>
>
> USE_ASSOCIATION_BANK_ACCOUNTS = True
>
>
> **
>
> This is *settings_common* file
>
> DMINS = ()
> BRIDGE_VERSION = "3.6.1 Build 202004.4" 
>
> MANAGERS = ADMINS
>
> TIME_ZONE = 'America/Vancouver'
> LANGUAGE_CODE = 'en-us'
> SITE_ID = 1
>
> USE_I18N = True
> USE_L10N = True
> USE_TZ = False
>
> # Make this unique and don't share it with anybody.
> SECRET_KEY ='removed for privacy reason'
> SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
>
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'bridge.request_access.Middleware',
> )
>
> ROOT_URLCONF 

Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-19 Thread Mike Dewhirst
I thought I'd go back and look at your original post. Your settings file 
looks a bit tricky.


I learned to deal with multiple settings files a long time ago so I 
don't know what current best practice is. Essentially, the way I do it 
is to have a complete base.py with all settings in a default state for 
security and production components. Then I have all my separate settings 
files ...


from base import *

... followed by the adjusted settings for that environment. Typically 
they will be production.py, staging.py and local.py


Then depending on the environment my wsgi.py imports settings.production 
or settings.mike-local or whatever.


It looks to me as though you are doing the opposite. Your wsgi.py 
imports a single settings file which has a massive if/elif block to 
import one of a multitude of other settings files each of which imports 
the equivalent of my base.py (your settings_common.py)


My mechanism has a single import statement while yours has at least two.

I think your wsgi.py should have the massive if/elif block to simply 
name the correct settings file (based on the host name) whenever the web 
server reloads.


It might reduce importing complexity somewhat and possibly solve the 
problem.


My settings arrangement is

base - all the settings as defaults
production - all the production settings no matter which host
staging - all the staging settings no matter which host
local - all the local settings including detecting the OS, setting DEBUG 
switching off security etc

local-mike - all my own settings including sqlite for faster testing
local-test - including postgreSQL for rigorous testing

I also needed to simulate environments. My mechanism is to rename the 
project directory and detect that in my settings.base.py like this ...


if deploy_dir == 'bis': # pragma: no cover
    PRODUCTION = "pq3"    # hostname
    DOMAIN = 'djfghdsgdlg.com'
    BRANDING = 'BIS'
    BRAND_URL = 'https://www.{0}/'.format(DOMAIN)
    ADMIN_URL = 'https://pay.{0}/admin'.format(DOMAIN)
    ALLOWED_HOSTS = [u'pay.{0}'.format(DOMAIN)]
    FUNCTION = 'invoice'
elif deploy_dir == 'cli': # pragma: no cover
    etc etc

I also wrote a couple of utilities which are called from dev versions of 
my settings files. They print out all settings which significantly 
change between hosts depending on which host I'm simulating.


In summary, I don't think I can help just by looking at the error - 
other than the obvious error being reported in a settings file - but I 
would definitely try and simplify the importing. And I do like to print 
out all the essential settings every time runserver reloads.


Good luck

M



On 20/05/2020 9:59 am, chaitanya orakala wrote:
Thank Jeorge. I went through that blog long back but I can't find a 
relation to my Error. I will try contacting my manager regarding this. 
will let you know if I find anything. Have a great day



On Tue, May 19, 2020 at 2:44 PM Jorge Gimeno > wrote:


I'm not sure why you're getting an exception.  I know the import
mechanism in Python 2 was a bit different, so I'm not sure if
that's the issue or if Django's import mechanism isn't finding
your settings file.

I don't know if you have tried this, but I saw a blog post on
using multiple settings files.  Maybe it will help:

https://simpleisbetterthancomplex.com/tips/2017/07/03/django-tip-20-working-with-multiple-settings-modules.html

I hope this helps!

-Jorge

On Mon, May 18, 2020 at 6:51 PM chaitanya orakala
mailto:chaitu.orak...@gmail.com>> wrote:

I tried that way, sir. but it's of no use. I don't know how to
resolve this issue. its been troubling me for 3 days now

On Mon, May 18, 2020 at 9:29 PM Mike Dewhirst
mailto:mi...@dewhirst.com.au>> wrote:

On 19/05/2020 11:10 am, chaitanya orakala wrote:
> I am using Python 2.7

It is possible you need a top line in the file like this ...

from __future__ import absolute_import

I haven't been following this thread so someone may have
mentioned that
already.


-- 
You received this message because you are subscribed to

the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to
django-users+unsubscr...@googlegroups.com
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/95afb956-98f8-6664-9107-d0935b75cf6c%40dewhirst.com.au.

-- 
You received this message because you are subscribed to the

Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to django-users+unsubscr...@googlegroups.com

Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-19 Thread chaitanya orakala
Thank Jeorge. I went through that blog long back but I can't find a
relation to my Error. I will try contacting my manager regarding this. will
let you know if I find anything. Have a great day


On Tue, May 19, 2020 at 2:44 PM Jorge Gimeno  wrote:

> I'm not sure why you're getting an exception.  I know the import mechanism
> in Python 2 was a bit different, so I'm not sure if that's the issue or if
> Django's import mechanism isn't finding your settings file.
>
> I don't know if you have tried this, but I saw a blog post on using
> multiple settings files.  Maybe it will help:
> https://simpleisbetterthancomplex.com/tips/2017/07/03/django-tip-20-working-with-multiple-settings-modules.html
>
> I hope this helps!
>
> -Jorge
>
> On Mon, May 18, 2020 at 6:51 PM chaitanya orakala <
> chaitu.orak...@gmail.com> wrote:
>
>> I tried that way, sir. but it's of no use. I don't know how to resolve
>> this issue. its been troubling me for 3 days now
>>
>> On Mon, May 18, 2020 at 9:29 PM Mike Dewhirst 
>> wrote:
>>
>>> On 19/05/2020 11:10 am, chaitanya orakala wrote:
>>> > I am using Python 2.7
>>>
>>> It is possible you need a top line in the file like this ...
>>>
>>> from __future__ import absolute_import
>>>
>>> I haven't been following this thread so someone may have mentioned that
>>> already.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/95afb956-98f8-6664-9107-d0935b75cf6c%40dewhirst.com.au
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPcTzRZHgBG1Q90Rk8VmNS%2ByzmQLd1bdq8ZPgA6A%2Bumsx4CGvw%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANfN%3DK9MAMn3WezyhMU5Rrv5DWWFNxQ0jc9RnfyK-qyCOiV%2BeA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcTzRaZCKqFZ-smQwNscYtmivyt1_tHhvF94wyN60LVHu4Wvw%40mail.gmail.com.


Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-19 Thread Jorge Gimeno
I'm not sure why you're getting an exception.  I know the import mechanism
in Python 2 was a bit different, so I'm not sure if that's the issue or if
Django's import mechanism isn't finding your settings file.

I don't know if you have tried this, but I saw a blog post on using
multiple settings files.  Maybe it will help:
https://simpleisbetterthancomplex.com/tips/2017/07/03/django-tip-20-working-with-multiple-settings-modules.html

I hope this helps!

-Jorge

On Mon, May 18, 2020 at 6:51 PM chaitanya orakala 
wrote:

> I tried that way, sir. but it's of no use. I don't know how to resolve
> this issue. its been troubling me for 3 days now
>
> On Mon, May 18, 2020 at 9:29 PM Mike Dewhirst 
> wrote:
>
>> On 19/05/2020 11:10 am, chaitanya orakala wrote:
>> > I am using Python 2.7
>>
>> It is possible you need a top line in the file like this ...
>>
>> from __future__ import absolute_import
>>
>> I haven't been following this thread so someone may have mentioned that
>> already.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/95afb956-98f8-6664-9107-d0935b75cf6c%40dewhirst.com.au
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPcTzRZHgBG1Q90Rk8VmNS%2ByzmQLd1bdq8ZPgA6A%2Bumsx4CGvw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK9MAMn3WezyhMU5Rrv5DWWFNxQ0jc9RnfyK-qyCOiV%2BeA%40mail.gmail.com.


Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-18 Thread chaitanya orakala
I tried that way, sir. but it's of no use. I don't know how to resolve
this issue. its been troubling me for 3 days now

On Mon, May 18, 2020 at 9:29 PM Mike Dewhirst  wrote:

> On 19/05/2020 11:10 am, chaitanya orakala wrote:
> > I am using Python 2.7
>
> It is possible you need a top line in the file like this ...
>
> from __future__ import absolute_import
>
> I haven't been following this thread so someone may have mentioned that
> already.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/95afb956-98f8-6664-9107-d0935b75cf6c%40dewhirst.com.au
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcTzRZHgBG1Q90Rk8VmNS%2ByzmQLd1bdq8ZPgA6A%2Bumsx4CGvw%40mail.gmail.com.


Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-18 Thread Mike Dewhirst

On 19/05/2020 11:10 am, chaitanya orakala wrote:
I am using Python 2.7 


It is possible you need a top line in the file like this ...

from __future__ import absolute_import

I haven't been following this thread so someone may have mentioned that 
already.



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/95afb956-98f8-6664-9107-d0935b75cf6c%40dewhirst.com.au.


Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-18 Thread chaitanya orakala
hey could anyone help with this?

On Mon, May 18, 2020 at 2:44 PM chaitanya orakala 
wrote:

> Hi Jorge,
> I tried placing a dot in front of settings_dev_sai, it didn't work. by the
> way, I am using Python 2.7 and Django 1.10 versions.
> [image: image.png]
> this is my project structure.  I am using a virtual environment.
> Please let me know what you think sir
>
> On Sat, May 16, 2020 at 7:54 PM Jorge Gimeno  wrote:
>
>> It's coming from your settings file.  I would try this:
>>
>> In this line here:
>> elif HOST == "Sai" :
>> from settings_dev_sai import *
>>
>> I would try to make the second line:
>> from .settings_dev_sai import *
>>
>> See if Python can find the module that way.  If Python does, then all of
>> the imports in that file need to be changed.
>>
>> If that's not the case, then we need to see what the directory structure
>> looks like to figure this out.
>>
>> -Jorge
>>
>> On Sat, May 16, 2020 at 4:04 PM chaitanya orakala <
>> chaitu.orak...@gmail.com> wrote:
>>
>>> Do you have any idea why i am getting this error?
>>>
>>> On Sat, May 16, 2020 at 6:40 PM chaitanya orakala <
>>> chaitu.orak...@gmail.com> wrote:
>>>
 Yes Jorge, all the settings file are in the same folder


 On Sat, May 16, 2020 at 5:20 PM Jorge Gimeno 
 wrote:

>
>
> On Sat, May 16, 2020 at 1:52 PM chaitan 
> wrote:
>
>> Hi, I am facing ModuleNotFoundError in my Django application. It got
>> configured with multiple settings files for production, Development &
>> Testing.
>> When I Try to run Python manage.py runserver --settings=
>> settings_dev_sai.
>>
>> This is My *Settings* File:
>>
>> import socket
>>
>> #import settings depending on the box we are on
>> HOST = socket.gethostname()
>> TPA_CODE = "Bridge"
>> TPA_NAME = "Bridge Benefits System"
>>
>> #development
>> if HOST == "BITS-DP-LAPTOP":
>> from settings_dev import *
>> TPA_NAME = "ICBA Benefit Services Ltd."
>> TPA_CODE = 'ICBA'
>> #DFG bridge
>> elif HOST == "dfginternal":
>> from settings_dfg_ees import *
>> TPA_NAME = "Dehoney Financial Group"
>> TPA_CODE = 'DFG'
>> #test
>> elif HOST == "DFGTEST02":
>> from settings_staging import *
>> elif HOST == "icbaweb":
>> from settings_production_icba import *
>> TPA_NAME = "ICBA Benefit Services Ltd."
>> TPA_CODE = 'ICBA'
>> elif HOST == "meritweb":
>> from settings_production_merit import *
>> TPA_NAME = "Ontario Construction Industry Benefit Plan"
>> TPA_CODE = 'MERIT'
>> elif HOST == "dfgweb" :
>> from settings_production_dfg import *
>> TPA_NAME = "Dehoney Financial Group"
>> TPA_CODE = 'DFG'
>> elif HOST == "dev" or HOST == "j-ubu" :
>> from settings_dev_baikal import *
>> elif HOST == "jdev" :
>> from settings_dev_juliab import *
>> elif HOST == "Sai" :
>> from settings_dev_sai import *
>> elif HOST == "johnstonesweb" :
>> from settings_production_johnstones import *
>> TPA_NAME = "Johnstone's Benefits"
>> TPA_CODE = 'JOHNSTONES'
>> elif HOST == "bridgedemo" :
>> from settings_demo import *
>> TPA_CODE = "Bridge"
>> TPA_NAME = "Bridge Benefits System"
>> else:
>> raise ImportError("This server's hostname [" + HOST + "] does not
>> have a proper expanded settings file. Please configure one.")
>> *
>>
>> This is my *settings_dev_sai*
>>
>> from settings_common import *
>>
>> DEBUG = True
>> RUN_TYPE = RUN_DEV
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
>> #'NAME': 'bridge_icba',
>> 'NAME': 'bridge_js',
>> #'NAME': 'bridge_dfg_internal',
>> #'NAME': 'bridge_dfg',
>> 'HOST': 'localhost',
>> 'USER': 'django',
>> 'PASSWORD': 'bridge_user',
>> 'PORT': '',
>> },
>> }
>>
>> MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work -
>> Bridge/Projects/bridge/MEDIA/'
>> MEDIA_URL = '/media/'
>>
>> EMAIL_HOST = 'smtp.gmail.com'
>> EMAIL_PORT = 587
>> EMAIL_HOST_USER = 'bridgeautomaticmessen...@gmail.com'
>> EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
>> EMAIL_USE_TLS = True
>> DEFAULT_FROM_EMAIL = 'bridgeautomaticmessen...@gmail.com'
>>
>>
>> STATIC_ROOT = ''
>> STATIC_URL = '/static/'
>> STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work -
>> Bridge/Projects/bridge/static",)
>> STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work -
>> Bridge/Projects/bridge/static'
>>
>> TEMPLATES = [
>> {
>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>> 'DIRS': 

Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-18 Thread chaitanya orakala
Hi Jorge,
I tried placing a dot in front of settings_dev_sai, it didn't work. by the
way, I am using Python 2.7 and Django 1.10 versions.
[image: image.png]
this is my project structure.  I am using a virtual environment.
Please let me know what you think sir

On Sat, May 16, 2020 at 7:54 PM Jorge Gimeno  wrote:

> It's coming from your settings file.  I would try this:
>
> In this line here:
> elif HOST == "Sai" :
> from settings_dev_sai import *
>
> I would try to make the second line:
> from .settings_dev_sai import *
>
> See if Python can find the module that way.  If Python does, then all of
> the imports in that file need to be changed.
>
> If that's not the case, then we need to see what the directory structure
> looks like to figure this out.
>
> -Jorge
>
> On Sat, May 16, 2020 at 4:04 PM chaitanya orakala <
> chaitu.orak...@gmail.com> wrote:
>
>> Do you have any idea why i am getting this error?
>>
>> On Sat, May 16, 2020 at 6:40 PM chaitanya orakala <
>> chaitu.orak...@gmail.com> wrote:
>>
>>> Yes Jorge, all the settings file are in the same folder
>>>
>>>
>>> On Sat, May 16, 2020 at 5:20 PM Jorge Gimeno 
>>> wrote:
>>>


 On Sat, May 16, 2020 at 1:52 PM chaitan 
 wrote:

> Hi, I am facing ModuleNotFoundError in my Django application. It got
> configured with multiple settings files for production, Development &
> Testing.
> When I Try to run Python manage.py runserver --settings=
> settings_dev_sai.
>
> This is My *Settings* File:
>
> import socket
>
> #import settings depending on the box we are on
> HOST = socket.gethostname()
> TPA_CODE = "Bridge"
> TPA_NAME = "Bridge Benefits System"
>
> #development
> if HOST == "BITS-DP-LAPTOP":
> from settings_dev import *
> TPA_NAME = "ICBA Benefit Services Ltd."
> TPA_CODE = 'ICBA'
> #DFG bridge
> elif HOST == "dfginternal":
> from settings_dfg_ees import *
> TPA_NAME = "Dehoney Financial Group"
> TPA_CODE = 'DFG'
> #test
> elif HOST == "DFGTEST02":
> from settings_staging import *
> elif HOST == "icbaweb":
> from settings_production_icba import *
> TPA_NAME = "ICBA Benefit Services Ltd."
> TPA_CODE = 'ICBA'
> elif HOST == "meritweb":
> from settings_production_merit import *
> TPA_NAME = "Ontario Construction Industry Benefit Plan"
> TPA_CODE = 'MERIT'
> elif HOST == "dfgweb" :
> from settings_production_dfg import *
> TPA_NAME = "Dehoney Financial Group"
> TPA_CODE = 'DFG'
> elif HOST == "dev" or HOST == "j-ubu" :
> from settings_dev_baikal import *
> elif HOST == "jdev" :
> from settings_dev_juliab import *
> elif HOST == "Sai" :
> from settings_dev_sai import *
> elif HOST == "johnstonesweb" :
> from settings_production_johnstones import *
> TPA_NAME = "Johnstone's Benefits"
> TPA_CODE = 'JOHNSTONES'
> elif HOST == "bridgedemo" :
> from settings_demo import *
> TPA_CODE = "Bridge"
> TPA_NAME = "Bridge Benefits System"
> else:
> raise ImportError("This server's hostname [" + HOST + "] does not
> have a proper expanded settings file. Please configure one.")
> *
>
> This is my *settings_dev_sai*
>
> from settings_common import *
>
> DEBUG = True
> RUN_TYPE = RUN_DEV
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> #'NAME': 'bridge_icba',
> 'NAME': 'bridge_js',
> #'NAME': 'bridge_dfg_internal',
> #'NAME': 'bridge_dfg',
> 'HOST': 'localhost',
> 'USER': 'django',
> 'PASSWORD': 'bridge_user',
> 'PORT': '',
> },
> }
>
> MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/MEDIA/'
> MEDIA_URL = '/media/'
>
> EMAIL_HOST = 'smtp.gmail.com'
> EMAIL_PORT = 587
> EMAIL_HOST_USER = 'bridgeautomaticmessen...@gmail.com'
> EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
> EMAIL_USE_TLS = True
> DEFAULT_FROM_EMAIL = 'bridgeautomaticmessen...@gmail.com'
>
>
> STATIC_ROOT = ''
> STATIC_URL = '/static/'
> STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/static",)
> STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/static'
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': ["C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/TEMPLATES",],
> 'APP_DIRS': False,
> 'OPTIONS': {
> 'context_processors': [
> 'django.contrib.auth.context_processors.auth',
> 

Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-16 Thread Jorge Gimeno
It's coming from your settings file.  I would try this:

In this line here:
elif HOST == "Sai" :
from settings_dev_sai import *

I would try to make the second line:
from .settings_dev_sai import *

See if Python can find the module that way.  If Python does, then all of
the imports in that file need to be changed.

If that's not the case, then we need to see what the directory structure
looks like to figure this out.

-Jorge

On Sat, May 16, 2020 at 4:04 PM chaitanya orakala 
wrote:

> Do you have any idea why i am getting this error?
>
> On Sat, May 16, 2020 at 6:40 PM chaitanya orakala <
> chaitu.orak...@gmail.com> wrote:
>
>> Yes Jorge, all the settings file are in the same folder
>>
>>
>> On Sat, May 16, 2020 at 5:20 PM Jorge Gimeno 
>> wrote:
>>
>>>
>>>
>>> On Sat, May 16, 2020 at 1:52 PM chaitan 
>>> wrote:
>>>
 Hi, I am facing ModuleNotFoundError in my Django application. It got
 configured with multiple settings files for production, Development &
 Testing.
 When I Try to run Python manage.py runserver --settings=
 settings_dev_sai.

 This is My *Settings* File:

 import socket

 #import settings depending on the box we are on
 HOST = socket.gethostname()
 TPA_CODE = "Bridge"
 TPA_NAME = "Bridge Benefits System"

 #development
 if HOST == "BITS-DP-LAPTOP":
 from settings_dev import *
 TPA_NAME = "ICBA Benefit Services Ltd."
 TPA_CODE = 'ICBA'
 #DFG bridge
 elif HOST == "dfginternal":
 from settings_dfg_ees import *
 TPA_NAME = "Dehoney Financial Group"
 TPA_CODE = 'DFG'
 #test
 elif HOST == "DFGTEST02":
 from settings_staging import *
 elif HOST == "icbaweb":
 from settings_production_icba import *
 TPA_NAME = "ICBA Benefit Services Ltd."
 TPA_CODE = 'ICBA'
 elif HOST == "meritweb":
 from settings_production_merit import *
 TPA_NAME = "Ontario Construction Industry Benefit Plan"
 TPA_CODE = 'MERIT'
 elif HOST == "dfgweb" :
 from settings_production_dfg import *
 TPA_NAME = "Dehoney Financial Group"
 TPA_CODE = 'DFG'
 elif HOST == "dev" or HOST == "j-ubu" :
 from settings_dev_baikal import *
 elif HOST == "jdev" :
 from settings_dev_juliab import *
 elif HOST == "Sai" :
 from settings_dev_sai import *
 elif HOST == "johnstonesweb" :
 from settings_production_johnstones import *
 TPA_NAME = "Johnstone's Benefits"
 TPA_CODE = 'JOHNSTONES'
 elif HOST == "bridgedemo" :
 from settings_demo import *
 TPA_CODE = "Bridge"
 TPA_NAME = "Bridge Benefits System"
 else:
 raise ImportError("This server's hostname [" + HOST + "] does not
 have a proper expanded settings file. Please configure one.")
 *

 This is my *settings_dev_sai*

 from settings_common import *

 DEBUG = True
 RUN_TYPE = RUN_DEV

 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.postgresql_psycopg2',
 #'NAME': 'bridge_icba',
 'NAME': 'bridge_js',
 #'NAME': 'bridge_dfg_internal',
 #'NAME': 'bridge_dfg',
 'HOST': 'localhost',
 'USER': 'django',
 'PASSWORD': 'bridge_user',
 'PORT': '',
 },
 }

 MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work -
 Bridge/Projects/bridge/MEDIA/'
 MEDIA_URL = '/media/'

 EMAIL_HOST = 'smtp.gmail.com'
 EMAIL_PORT = 587
 EMAIL_HOST_USER = 'bridgeautomaticmessen...@gmail.com'
 EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
 EMAIL_USE_TLS = True
 DEFAULT_FROM_EMAIL = 'bridgeautomaticmessen...@gmail.com'


 STATIC_ROOT = ''
 STATIC_URL = '/static/'
 STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work -
 Bridge/Projects/bridge/static",)
 STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work -
 Bridge/Projects/bridge/static'

 TEMPLATES = [
 {
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': ["C:/Users/DavidPiccione/Dropbox/Work -
 Bridge/Projects/bridge/TEMPLATES",],
 'APP_DIRS': False,
 'OPTIONS': {
 'context_processors': [
 'django.contrib.auth.context_processors.auth',
 'django.template.context_processors.debug',
 'django.template.context_processors.i18n',
 'django.template.context_processors.media',
 'django.template.context_processors.static',
 'django.template.context_processors.tz',
 'django.template.context_processors.request',
 'django.contrib.messages.context_processors.messages',
 

Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-16 Thread chaitanya orakala
Do you have any idea why i am getting this error?

On Sat, May 16, 2020 at 6:40 PM chaitanya orakala 
wrote:

> Yes Jorge, all the settings file are in the same folder
>
>
> On Sat, May 16, 2020 at 5:20 PM Jorge Gimeno  wrote:
>
>>
>>
>> On Sat, May 16, 2020 at 1:52 PM chaitan  wrote:
>>
>>> Hi, I am facing ModuleNotFoundError in my Django application. It got
>>> configured with multiple settings files for production, Development &
>>> Testing.
>>> When I Try to run Python manage.py runserver --settings=
>>> settings_dev_sai.
>>>
>>> This is My *Settings* File:
>>>
>>> import socket
>>>
>>> #import settings depending on the box we are on
>>> HOST = socket.gethostname()
>>> TPA_CODE = "Bridge"
>>> TPA_NAME = "Bridge Benefits System"
>>>
>>> #development
>>> if HOST == "BITS-DP-LAPTOP":
>>> from settings_dev import *
>>> TPA_NAME = "ICBA Benefit Services Ltd."
>>> TPA_CODE = 'ICBA'
>>> #DFG bridge
>>> elif HOST == "dfginternal":
>>> from settings_dfg_ees import *
>>> TPA_NAME = "Dehoney Financial Group"
>>> TPA_CODE = 'DFG'
>>> #test
>>> elif HOST == "DFGTEST02":
>>> from settings_staging import *
>>> elif HOST == "icbaweb":
>>> from settings_production_icba import *
>>> TPA_NAME = "ICBA Benefit Services Ltd."
>>> TPA_CODE = 'ICBA'
>>> elif HOST == "meritweb":
>>> from settings_production_merit import *
>>> TPA_NAME = "Ontario Construction Industry Benefit Plan"
>>> TPA_CODE = 'MERIT'
>>> elif HOST == "dfgweb" :
>>> from settings_production_dfg import *
>>> TPA_NAME = "Dehoney Financial Group"
>>> TPA_CODE = 'DFG'
>>> elif HOST == "dev" or HOST == "j-ubu" :
>>> from settings_dev_baikal import *
>>> elif HOST == "jdev" :
>>> from settings_dev_juliab import *
>>> elif HOST == "Sai" :
>>> from settings_dev_sai import *
>>> elif HOST == "johnstonesweb" :
>>> from settings_production_johnstones import *
>>> TPA_NAME = "Johnstone's Benefits"
>>> TPA_CODE = 'JOHNSTONES'
>>> elif HOST == "bridgedemo" :
>>> from settings_demo import *
>>> TPA_CODE = "Bridge"
>>> TPA_NAME = "Bridge Benefits System"
>>> else:
>>> raise ImportError("This server's hostname [" + HOST + "] does not
>>> have a proper expanded settings file. Please configure one.")
>>> *
>>>
>>> This is my *settings_dev_sai*
>>>
>>> from settings_common import *
>>>
>>> DEBUG = True
>>> RUN_TYPE = RUN_DEV
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
>>> #'NAME': 'bridge_icba',
>>> 'NAME': 'bridge_js',
>>> #'NAME': 'bridge_dfg_internal',
>>> #'NAME': 'bridge_dfg',
>>> 'HOST': 'localhost',
>>> 'USER': 'django',
>>> 'PASSWORD': 'bridge_user',
>>> 'PORT': '',
>>> },
>>> }
>>>
>>> MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work -
>>> Bridge/Projects/bridge/MEDIA/'
>>> MEDIA_URL = '/media/'
>>>
>>> EMAIL_HOST = 'smtp.gmail.com'
>>> EMAIL_PORT = 587
>>> EMAIL_HOST_USER = 'bridgeautomaticmessen...@gmail.com'
>>> EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
>>> EMAIL_USE_TLS = True
>>> DEFAULT_FROM_EMAIL = 'bridgeautomaticmessen...@gmail.com'
>>>
>>>
>>> STATIC_ROOT = ''
>>> STATIC_URL = '/static/'
>>> STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work -
>>> Bridge/Projects/bridge/static",)
>>> STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work -
>>> Bridge/Projects/bridge/static'
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> 'DIRS': ["C:/Users/DavidPiccione/Dropbox/Work -
>>> Bridge/Projects/bridge/TEMPLATES",],
>>> 'APP_DIRS': False,
>>> 'OPTIONS': {
>>> 'context_processors': [
>>> 'django.contrib.auth.context_processors.auth',
>>> 'django.template.context_processors.debug',
>>> 'django.template.context_processors.i18n',
>>> 'django.template.context_processors.media',
>>> 'django.template.context_processors.static',
>>> 'django.template.context_processors.tz',
>>> 'django.template.context_processors.request',
>>> 'django.contrib.messages.context_processors.messages',
>>> 'bridge.context_processors.global_settings',],
>>> },
>>> },
>>> ]
>>>
>>>
>>> USE_ASSOCIATION_BANK_ACCOUNTS = True
>>>
>>>
>>> **
>>>
>>> This is *settings_common* file
>>>
>>> DMINS = ()
>>> BRIDGE_VERSION = "3.6.1 Build 202004.4"
>>>
>>> MANAGERS = ADMINS
>>>
>>> TIME_ZONE = 'America/Vancouver'
>>> LANGUAGE_CODE = 'en-us'
>>> SITE_ID = 1
>>>
>>> USE_I18N = True
>>> USE_L10N = True
>>> USE_TZ = False
>>>
>>> # Make this unique and don't share it with anybody.
>>> SECRET_KEY ='removed for privacy reason'
>>> SESSION_SERIALIZER =
>>> 'django.contrib.sessions.serializers.PickleSerializer'
>>>
>>> STATICFILES_FINDERS 

Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-16 Thread chaitanya orakala
Yes Jorge, all the settings file are in the same folder


On Sat, May 16, 2020 at 5:20 PM Jorge Gimeno  wrote:

>
>
> On Sat, May 16, 2020 at 1:52 PM chaitan  wrote:
>
>> Hi, I am facing ModuleNotFoundError in my Django application. It got
>> configured with multiple settings files for production, Development &
>> Testing.
>> When I Try to run Python manage.py runserver --settings=
>> settings_dev_sai.
>>
>> This is My *Settings* File:
>>
>> import socket
>>
>> #import settings depending on the box we are on
>> HOST = socket.gethostname()
>> TPA_CODE = "Bridge"
>> TPA_NAME = "Bridge Benefits System"
>>
>> #development
>> if HOST == "BITS-DP-LAPTOP":
>> from settings_dev import *
>> TPA_NAME = "ICBA Benefit Services Ltd."
>> TPA_CODE = 'ICBA'
>> #DFG bridge
>> elif HOST == "dfginternal":
>> from settings_dfg_ees import *
>> TPA_NAME = "Dehoney Financial Group"
>> TPA_CODE = 'DFG'
>> #test
>> elif HOST == "DFGTEST02":
>> from settings_staging import *
>> elif HOST == "icbaweb":
>> from settings_production_icba import *
>> TPA_NAME = "ICBA Benefit Services Ltd."
>> TPA_CODE = 'ICBA'
>> elif HOST == "meritweb":
>> from settings_production_merit import *
>> TPA_NAME = "Ontario Construction Industry Benefit Plan"
>> TPA_CODE = 'MERIT'
>> elif HOST == "dfgweb" :
>> from settings_production_dfg import *
>> TPA_NAME = "Dehoney Financial Group"
>> TPA_CODE = 'DFG'
>> elif HOST == "dev" or HOST == "j-ubu" :
>> from settings_dev_baikal import *
>> elif HOST == "jdev" :
>> from settings_dev_juliab import *
>> elif HOST == "Sai" :
>> from settings_dev_sai import *
>> elif HOST == "johnstonesweb" :
>> from settings_production_johnstones import *
>> TPA_NAME = "Johnstone's Benefits"
>> TPA_CODE = 'JOHNSTONES'
>> elif HOST == "bridgedemo" :
>> from settings_demo import *
>> TPA_CODE = "Bridge"
>> TPA_NAME = "Bridge Benefits System"
>> else:
>> raise ImportError("This server's hostname [" + HOST + "] does not
>> have a proper expanded settings file. Please configure one.")
>> *
>>
>> This is my *settings_dev_sai*
>>
>> from settings_common import *
>>
>> DEBUG = True
>> RUN_TYPE = RUN_DEV
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
>> #'NAME': 'bridge_icba',
>> 'NAME': 'bridge_js',
>> #'NAME': 'bridge_dfg_internal',
>> #'NAME': 'bridge_dfg',
>> 'HOST': 'localhost',
>> 'USER': 'django',
>> 'PASSWORD': 'bridge_user',
>> 'PORT': '',
>> },
>> }
>>
>> MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work -
>> Bridge/Projects/bridge/MEDIA/'
>> MEDIA_URL = '/media/'
>>
>> EMAIL_HOST = 'smtp.gmail.com'
>> EMAIL_PORT = 587
>> EMAIL_HOST_USER = 'bridgeautomaticmessen...@gmail.com'
>> EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
>> EMAIL_USE_TLS = True
>> DEFAULT_FROM_EMAIL = 'bridgeautomaticmessen...@gmail.com'
>>
>>
>> STATIC_ROOT = ''
>> STATIC_URL = '/static/'
>> STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work -
>> Bridge/Projects/bridge/static",)
>> STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work -
>> Bridge/Projects/bridge/static'
>>
>> TEMPLATES = [
>> {
>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>> 'DIRS': ["C:/Users/DavidPiccione/Dropbox/Work -
>> Bridge/Projects/bridge/TEMPLATES",],
>> 'APP_DIRS': False,
>> 'OPTIONS': {
>> 'context_processors': [
>> 'django.contrib.auth.context_processors.auth',
>> 'django.template.context_processors.debug',
>> 'django.template.context_processors.i18n',
>> 'django.template.context_processors.media',
>> 'django.template.context_processors.static',
>> 'django.template.context_processors.tz',
>> 'django.template.context_processors.request',
>> 'django.contrib.messages.context_processors.messages',
>> 'bridge.context_processors.global_settings',],
>> },
>> },
>> ]
>>
>>
>> USE_ASSOCIATION_BANK_ACCOUNTS = True
>>
>>
>> **
>>
>> This is *settings_common* file
>>
>> DMINS = ()
>> BRIDGE_VERSION = "3.6.1 Build 202004.4"
>>
>> MANAGERS = ADMINS
>>
>> TIME_ZONE = 'America/Vancouver'
>> LANGUAGE_CODE = 'en-us'
>> SITE_ID = 1
>>
>> USE_I18N = True
>> USE_L10N = True
>> USE_TZ = False
>>
>> # Make this unique and don't share it with anybody.
>> SECRET_KEY ='removed for privacy reason'
>> SESSION_SERIALIZER =
>> 'django.contrib.sessions.serializers.PickleSerializer'
>>
>> STATICFILES_FINDERS = (
>> 'django.contrib.staticfiles.finders.FileSystemFinder',
>> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
>> )
>>
>> MIDDLEWARE_CLASSES = (
>> 'django.middleware.common.CommonMiddleware',
>> 

Re: PROBLEM WITH Multiple SETTINGS.PY FILE

2020-05-16 Thread Jorge Gimeno
On Sat, May 16, 2020 at 1:52 PM chaitan  wrote:

> Hi, I am facing ModuleNotFoundError in my Django application. It got
> configured with multiple settings files for production, Development &
> Testing.
> When I Try to run Python manage.py runserver --settings= settings_dev_sai.
>
> This is My *Settings* File:
>
> import socket
>
> #import settings depending on the box we are on
> HOST = socket.gethostname()
> TPA_CODE = "Bridge"
> TPA_NAME = "Bridge Benefits System"
>
> #development
> if HOST == "BITS-DP-LAPTOP":
> from settings_dev import *
> TPA_NAME = "ICBA Benefit Services Ltd."
> TPA_CODE = 'ICBA'
> #DFG bridge
> elif HOST == "dfginternal":
> from settings_dfg_ees import *
> TPA_NAME = "Dehoney Financial Group"
> TPA_CODE = 'DFG'
> #test
> elif HOST == "DFGTEST02":
> from settings_staging import *
> elif HOST == "icbaweb":
> from settings_production_icba import *
> TPA_NAME = "ICBA Benefit Services Ltd."
> TPA_CODE = 'ICBA'
> elif HOST == "meritweb":
> from settings_production_merit import *
> TPA_NAME = "Ontario Construction Industry Benefit Plan"
> TPA_CODE = 'MERIT'
> elif HOST == "dfgweb" :
> from settings_production_dfg import *
> TPA_NAME = "Dehoney Financial Group"
> TPA_CODE = 'DFG'
> elif HOST == "dev" or HOST == "j-ubu" :
> from settings_dev_baikal import *
> elif HOST == "jdev" :
> from settings_dev_juliab import *
> elif HOST == "Sai" :
> from settings_dev_sai import *
> elif HOST == "johnstonesweb" :
> from settings_production_johnstones import *
> TPA_NAME = "Johnstone's Benefits"
> TPA_CODE = 'JOHNSTONES'
> elif HOST == "bridgedemo" :
> from settings_demo import *
> TPA_CODE = "Bridge"
> TPA_NAME = "Bridge Benefits System"
> else:
> raise ImportError("This server's hostname [" + HOST + "] does not have
> a proper expanded settings file. Please configure one.")
> *
>
> This is my *settings_dev_sai*
>
> from settings_common import *
>
> DEBUG = True
> RUN_TYPE = RUN_DEV
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> #'NAME': 'bridge_icba',
> 'NAME': 'bridge_js',
> #'NAME': 'bridge_dfg_internal',
> #'NAME': 'bridge_dfg',
> 'HOST': 'localhost',
> 'USER': 'django',
> 'PASSWORD': 'bridge_user',
> 'PORT': '',
> },
> }
>
> MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/MEDIA/'
> MEDIA_URL = '/media/'
>
> EMAIL_HOST = 'smtp.gmail.com'
> EMAIL_PORT = 587
> EMAIL_HOST_USER = 'bridgeautomaticmessen...@gmail.com'
> EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
> EMAIL_USE_TLS = True
> DEFAULT_FROM_EMAIL = 'bridgeautomaticmessen...@gmail.com'
>
>
> STATIC_ROOT = ''
> STATIC_URL = '/static/'
> STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/static",)
> STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/static'
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': ["C:/Users/DavidPiccione/Dropbox/Work -
> Bridge/Projects/bridge/TEMPLATES",],
> 'APP_DIRS': False,
> 'OPTIONS': {
> 'context_processors': [
> 'django.contrib.auth.context_processors.auth',
> 'django.template.context_processors.debug',
> 'django.template.context_processors.i18n',
> 'django.template.context_processors.media',
> 'django.template.context_processors.static',
> 'django.template.context_processors.tz',
> 'django.template.context_processors.request',
> 'django.contrib.messages.context_processors.messages',
> 'bridge.context_processors.global_settings',],
> },
> },
> ]
>
>
> USE_ASSOCIATION_BANK_ACCOUNTS = True
>
>
> **
>
> This is *settings_common* file
>
> DMINS = ()
> BRIDGE_VERSION = "3.6.1 Build 202004.4"
>
> MANAGERS = ADMINS
>
> TIME_ZONE = 'America/Vancouver'
> LANGUAGE_CODE = 'en-us'
> SITE_ID = 1
>
> USE_I18N = True
> USE_L10N = True
> USE_TZ = False
>
> # Make this unique and don't share it with anybody.
> SECRET_KEY ='removed for privacy reason'
> SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
>
> STATICFILES_FINDERS = (
> 'django.contrib.staticfiles.finders.FileSystemFinder',
> 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'bridge.request_access.Middleware',
> )
>
> ROOT_URLCONF = 'bridge.urls'
>