Skip to content

Commit f5b2f35

Browse files
committed
Restructure the app
1 parent 8e69030 commit f5b2f35

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

conf_templates/gunicorn.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ exec gunicorn --pythonpath "%(DEPLOY_DIR)s" \
2222
--group "%(GROUP)s" \
2323
--log-level "info" \
2424
--log-file "$LOG_FILE" \
25-
steepshot_io.config.wsgi:application
25+
steepshot_io.wsgi:application

fabfile.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def migrate():
233233
with cd(DEPLOY_DIR):
234234
with settings(sudo_user=DEPLOYMENT_USER,
235235
sudo_prefix=SUDO_PREFIX), prefix('workon steepshot_io'):
236-
sudo('python steepshot_io/manage.py migrate')
236+
sudo('python manage.py migrate')
237237

238238

239239
def config_celery(remote_conf_path):
@@ -417,8 +417,8 @@ def deploy_static():
417417
with settings(sudo_user=DEPLOYMENT_USER,
418418
sudo_prefix=SUDO_PREFIX), cd(DEPLOY_DIR):
419419
with prefix('workon %s' % ENV_NAME):
420-
sudo('python steepshot_io/manage.py collectstatic --noinput --settings %s'
421-
% env.settings_module.replace('steepshot_io.', ''))
420+
sudo('python manage.py collectstatic --noinput --settings %s'
421+
% env.settings_module)
422422

423423

424424
@task
@@ -435,7 +435,7 @@ def createsuperuser():
435435
with settings(sudo_user=DEPLOYMENT_USER,
436436
sudo_prefix=SUDO_PREFIX):
437437
with prefix('workon %s' % ENV_NAME):
438-
sudo('python steepshot_io/manage.py createsuperuser '
438+
sudo('python manage.py createsuperuser '
439439
'--settings ' + env.settings_module)
440440

441441

steepshot_io/manage.py manage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55
if __name__ == "__main__":
6-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod_settings")
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "prod_settings")
77
try:
88
from django.core.management import execute_from_command_line
99
except ImportError:

steepshot_io/celeryapp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from django.conf import settings
88

99
# Indicate Celery to use the default Django settings module
10-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.prod_settings')
10+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'prod_settings')
1111

1212
app = Celery('steepshot_io')
1313
app.config_from_object('django.conf:settings')

steepshot_io/config/__init__.py

Whitespace-only changes.

steepshot_io/deploy_settings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
GUNI_TIMEOUT = 60
7474
GUNI_GRACEFUL_TIMEOUT = 180
7575

76-
SETTINGS_MODULE = 'steepshot_io.config.prod_settings'
77-
GOLOS_SETTINGS_MODULE = 'steepshot_io.config.golos_prod_settings'
76+
SETTINGS_MODULE = 'steepshot_io.prod_settings'
77+
GOLOS_SETTINGS_MODULE = 'steepshot_io.golos_prod_settings'
7878

7979

8080
ENVIRONMENTS = {

steepshot_io/config/prod_settings.py steepshot_io/prod_settings.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import dj_database_url
1515

1616
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
17-
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
17+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1818

1919

2020
# Quick-start development settings - unsuitable for production
@@ -34,7 +34,7 @@
3434
else:
3535
LOCAL = False
3636

37-
PROJECT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
37+
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
3838

3939
if DEBUG:
4040
ALLOWED_HOSTS = ['*']
@@ -80,7 +80,7 @@
8080
'django.middleware.clickjacking.XFrameOptionsMiddleware',
8181
]
8282

83-
ROOT_URLCONF = 'config.urls'
83+
ROOT_URLCONF = 'urls'
8484

8585
TEMPLATES = [
8686
{
@@ -106,7 +106,7 @@
106106
},
107107
]
108108

109-
WSGI_APPLICATION = 'config.wsgi.application'
109+
WSGI_APPLICATION = 'wsgi.application'
110110

111111

112112
# Database
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)