Sfoglia il codice sorgente

Merge branch 'master' of github.com:wagtail/bakerydemo

Arnar Tumi Þorsteinsson 8 anni fa
parent
commit
4a6819ff89

+ 1 - 1
Procfile

@@ -1,2 +1,2 @@
 release: yes "yes" | python manage.py migrate
-web: uwsgi --http :$PORT --module bakerydemo.heroku_wsgi --master --offload-threads 1
+web: gunicorn bakerydemo.heroku_wsgi --log-file -

+ 3 - 4
bakerydemo/heroku_wsgi.py

@@ -1,6 +1,5 @@
+from django.core.wsgi import get_wsgi_application
 from whitenoise.django import DjangoWhiteNoise
 
-from .wsgi import application as _application
-
-
-application = DjangoWhiteNoise(_application)
+application = get_wsgi_application()
+application = DjangoWhiteNoise(application)

+ 6 - 1
bakerydemo/settings/heroku.py

@@ -15,8 +15,13 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
 # BASE_URL required for notification emails
 BASE_URL = 'http://localhost:8000'
 
-DATABASES = {'default': dj_database_url.config(default='postgres://postgres@localhost:5432/wagtaildemo')}
+db_from_env = dj_database_url.config(conn_max_age=500)
+DATABASES['default'].update(db_from_env)
 
+# Simplified static file serving.
+# https://warehouse.python.org/project/whitenoise/
+
+STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
 
 try:
     from .local import *

+ 0 - 6
bakerydemo/templates/base.html

@@ -68,12 +68,6 @@
                 {% get_site_root as site_root %}
                 {% top_menu parent=site_root calling_page=self %}
                 {# main_menu is defined in base/templatetags/navigation_tags.py #}
-                {% comment %}
-                <li role="presentation" class="active"><a href="#">Bread</a></li>
-                <li role="presentation"><a href="#">Blog</a></li>
-                <li role="presentation"><a href="#">About</a></li>
-                <li role="presentation"><a href="#">Contact</a></li>
-                {% endcomment %}
               </ul>
             </nav>
           </div>

+ 4 - 3
requirements.txt

@@ -5,6 +5,7 @@ wagtailfontawesome
 Pillow
 
 # Dependencies for Heroku deployment
-dj-database-url==0.3.0
-whitenoise>=3.1,<4.0
-uwsgi>=2.0,<2.1
+dj-database-url==0.4.1
+whitenoise==3.2.2
+gunicorn==19.6.0
+psycopg2==2.6.2