Sfoglia il codice sorgente

merging conflicting migrations, adding heroku bits

David Ray 8 anni fa
parent
commit
2d45e8add8

+ 16 - 0
app.json

@@ -0,0 +1,16 @@
+{
+  "name": "WagtailBakeryDemo",
+  "description": "WagtailBakeryDemo",
+  "repository": "https://github.com/wagtail/bakerydemo",
+  "logo": "http://wagtail.io/static/wagtailsite/images/navlogo2.png",
+  "keywords": ["wagtail", "django"],
+  "env": {
+    "DJANGO_SETTINGS_MODULE": "bakerydemo.settings.heroku"
+  },
+  "scripts": {
+    "postdeploy": "django-admin.py migrate && django-admin.py load_initial_data && echo 'from wagtail.wagtailimages.models import Rendition; Rendition.objects.all().delete()' | django-admin.py shell"
+  },
+  "addons": [
+    "heroku-postgresql:hobby-dev"
+  ]
+}

+ 16 - 0
bakerydemo/base/migrations/0005_merge_20170210_1551.py

@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2017-02-10 15:51
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('base', '0004_auto_20170210_1420'),
+        ('base', '0004_auto_20170210_1445'),
+    ]
+
+    operations = [
+    ]

+ 6 - 0
bakerydemo/heroku_wsgi.py

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

+ 24 - 0
bakerydemo/settings/heroku.py

@@ -0,0 +1,24 @@
+import dj_database_url
+
+from .base import *
+
+
+DEBUG = True
+
+# Accept all hostnames, since we don't know in advance which hostname will be used for any given Heroku instance.
+# IMPORTANT: Set this to a real hostname when using this in production!
+# See https://docs.djangoproject.com/en/1.10/ref/settings/#allowed-hosts
+ALLOWED_HOSTS = ['*']
+
+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')}
+
+
+try:
+    from .local import *
+except ImportError:
+    pass