File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
import sys
3
+ import os
3
4
from os .path import dirname , abspath
4
5
from optparse import OptionParser
5
6
6
7
from django .conf import settings , global_settings
7
8
8
- if not settings .configured :
9
+ # For convenience configure settings if they are not pre-configured or if we
10
+ # haven't been provided settings to use by environment variable.
11
+ if not settings .configured and not os .environ .get ('DJANGO_SETTINGS_MODULE' ):
9
12
settings .configure (
10
13
DATABASES = {
11
14
'default' : {
Original file line number Diff line number Diff line change
1
+ from django .conf import global_settings
2
+ DATABASES = {
3
+ 'default' : {
4
+ 'ENGINE' : 'django.db.backends.postgresql_psycopg2' ,
5
+ # Edit the below settings before use...
6
+ 'USER' : '' ,
7
+ 'NAME' : '' ,
8
+ 'HOST' : '' ,
9
+ 'PASSWORD' : '' ,
10
+ }
11
+ }
12
+ INSTALLED_APPS = [
13
+ 'django.contrib.auth' ,
14
+ 'django.contrib.admin' ,
15
+ 'django.contrib.contenttypes' ,
16
+ 'django.contrib.sessions' ,
17
+ 'django.contrib.sites' ,
18
+
19
+ 'debug_toolbar' ,
20
+
21
+ 'tests' ,
22
+ ]
23
+ MIDDLEWARE_CLASSES = global_settings .MIDDLEWARE_CLASSES + (
24
+ 'debug_toolbar.middleware.DebugToolbarMiddleware' ,
25
+ )
26
+ ROOT_URLCONF = ''
27
+ DEBUG = False
28
+ SITE_ID = 1
You can’t perform that action at this time.
0 commit comments