Add Heroku support

This commit is contained in:
Gergely Polonkai 2015-05-27 22:19:18 +02:00
parent 606ef7df9e
commit 80096d72e4
4 changed files with 9 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,5 +2,6 @@
*.pyc *.pyc
/db.sqlite3 /db.sqlite3
/venv/ /venv/
/static/
/.coverage /.coverage
/htmlcov/ /htmlcov/

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: gunicorn duckbook.wsgi --log-file=-

View File

@ -85,6 +85,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/1.7/howto/static-files/ # https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = 'static'
MAX_DUCK_LEVEL = 5 MAX_DUCK_LEVEL = 5
COMP_WARN_LEVEL = 2 COMP_WARN_LEVEL = 2

View File

@ -1,10 +1,16 @@
from django.conf.urls import patterns, include, url from django.conf.urls import patterns, include, url
from django.contrib import admin from django.contrib import admin
from django.conf import settings
admin.autodiscover() admin.autodiscover()
urlpatterns = patterns( urlpatterns = patterns(
'', '',
url(
r'^static/(?P<path>.*)$',
'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}
),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('accounts.urls', namespace = 'accounts')), url(r'^accounts/', include('accounts.urls', namespace = 'accounts')),
url(r'^api/', include('api.urls', namespace = 'api')), url(r'^api/', include('api.urls', namespace = 'api')),