kopia lustrzana https://github.com/wagtail/bakerydemo
commit
1b8f29b814
|
@ -8,7 +8,7 @@ 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 = ['*', 'wagtailbakerydemo.herokuapp.com']
|
||||
ALLOWED_HOSTS = ['*', ]
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
||||
|
@ -22,8 +22,3 @@ DATABASES['default'].update(db_from_env)
|
|||
# https://warehouse.python.org/project/whitenoise/
|
||||
|
||||
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
|
||||
|
||||
try:
|
||||
from .local import *
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
26
readme.md
26
readme.md
|
@ -1,5 +1,3 @@
|
|||
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/wagtail/bakerydemo)
|
||||
|
||||
Wagtail demo project
|
||||
=======================
|
||||
|
||||
|
@ -53,7 +51,7 @@ With PIP installed run the following commands:
|
|||
|
||||
git clone git@github.com:wagtail/bakerydemo.git
|
||||
cd wagtaildemo
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements/base.txt
|
||||
./manage.py migrate
|
||||
./manage.py load_initial_data
|
||||
./manage.py runserver
|
||||
|
@ -66,4 +64,24 @@ Because we can't (easily) use ElasticSearch for this demo, we use wagtail's nati
|
|||
However, native DB search can't search specific fields in our models on a generalized `Page` query.
|
||||
So for demo purposes ONLY, we hard-code the model names we want to search into `search.views`, which is
|
||||
not ideal. In production, use ElasticSearch and a simplified search query, per
|
||||
http://docs.wagtail.io/en/v1.8.1/topics/search/searching.html
|
||||
[http://docs.wagtail.io/en/v1.8.1/topics/search/searching.html](http://docs.wagtail.io/en/v1.8.1/topics/search/searching.html).
|
||||
|
||||
### Heroku deployment:
|
||||
|
||||
If you need to deploy your demo site to a publicly accessible server [Heroku](https://heroku.com)
|
||||
provides a one-click deployment solution:
|
||||
|
||||
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/wagtail/bakerydemo)
|
||||
|
||||
If you do not have a Heroku account, clicking the above button will walk you through the steps
|
||||
to generate one. After which, you will be presented with a screen to configure your app. For our purposes,
|
||||
we will accept all of the defaults and click `Deploy`. The status of the deployment will dynamically
|
||||
update in the browser. Once finished, click `View` to see the public site.
|
||||
|
||||
Log into the admin with the credentials ``admin / changeme``.
|
||||
|
||||
To learn more about Heroku, read [Deploying Python and Django Apps on Heroku](https://devcenter.heroku.com/articles/deploying-python).
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1 @@
|
|||
Django
|
||||
elasticsearch
|
||||
wagtail
|
||||
wagtailfontawesome
|
||||
Pillow
|
||||
|
||||
# Dependencies for Heroku deployment
|
||||
dj-database-url==0.4.1
|
||||
whitenoise==3.2.2
|
||||
gunicorn==19.6.0
|
||||
psycopg2==2.6.2
|
||||
-r requirements/heroku.txt
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Django
|
||||
elasticsearch
|
||||
wagtail
|
||||
wagtailfontawesome
|
||||
Pillow
|
|
@ -0,0 +1,6 @@
|
|||
-r base.txt
|
||||
# Additional dependencies for Heroku deployment
|
||||
dj-database-url
|
||||
gunicorn
|
||||
psycopg2
|
||||
whitenoise
|
|
@ -25,7 +25,7 @@ su - vagrant -c "echo $PROJECT_DIR > $VIRTUALENV_DIR/.project"
|
|||
su - vagrant -c "$PIP install --upgrade pip"
|
||||
|
||||
# Install PIP requirements
|
||||
su - vagrant -c "$PIP install -r $PROJECT_DIR/requirements.txt"
|
||||
su - vagrant -c "$PIP install -r $PROJECT_DIR/requirements/base.txt"
|
||||
|
||||
|
||||
# Set execute permissions on manage.py as they get lost if we build from a zip file
|
||||
|
|
Ładowanie…
Reference in New Issue