Update to allow running on Heroku
This commit is contained in:
parent
8effdbb1e6
commit
000d63d49b
22
README.md
22
README.md
@ -18,9 +18,13 @@ decided to make this it's own website.
|
|||||||
* DATABASE_HOST
|
* DATABASE_HOST
|
||||||
* Modify the `ADMINS` variable in `settings.py` so you get emails when the site
|
* Modify the `ADMINS` variable in `settings.py` so you get emails when the site
|
||||||
errors (happens when eSuds changes something on their site).
|
errors (happens when eSuds changes something on their site).
|
||||||
|
* Create and activate a virtualenv: `virtualenv venv` and
|
||||||
|
`source venv/bin/activate`
|
||||||
|
* Install the requirements: `pip install -r requirements.txt`
|
||||||
* Run syncdb: `python manage.py syncdb`
|
* Run syncdb: `python manage.py syncdb`
|
||||||
* Import the GMU Laundry Hall data: `python manage.py loaddata laundry.json`
|
* Import the GMU Laundry Hall data: `python manage.py loaddata laundry.json`
|
||||||
* Run the server: `python manage.py runserver`
|
* Run the server: `python manage.py runserver`
|
||||||
|
* Don't forget to set `DEBUG` to `False` when you are production ready.
|
||||||
|
|
||||||
##Errors##
|
##Errors##
|
||||||
|
|
||||||
@ -48,6 +52,24 @@ Sometimes errors happen when eSuds goes down too. Nothing we can really do about
|
|||||||
that, but perhaps we can improve our downtime by caching previous results and
|
that, but perhaps we can improve our downtime by caching previous results and
|
||||||
showing those in the intrim.
|
showing those in the intrim.
|
||||||
|
|
||||||
|
##Backups##
|
||||||
|
|
||||||
|
It would be a good idea to periodically dump the database because, right now,
|
||||||
|
there isn't an automated way of creating the Halls and LaundryMachines. To [save
|
||||||
|
the
|
||||||
|
database](https://docs.djangoproject.com/en/dev/ref/django-admin/#dumpdata-app-label-app-label-app-label-model)
|
||||||
|
run:
|
||||||
|
|
||||||
|
`python manage.py dumpdata laundry_app > laundry_backup.json`
|
||||||
|
|
||||||
|
You can load a backup with:
|
||||||
|
|
||||||
|
`python manage.py loaddata laundry_backup.json`
|
||||||
|
|
||||||
|
It would be nice of you to keep the `laundry.json` file in this repo up-to-date
|
||||||
|
as halls' laundry machine configurations change so that anyone setting up this
|
||||||
|
application will not have errors upon starting up.
|
||||||
|
|
||||||
##Todo##
|
##Todo##
|
||||||
|
|
||||||
Move away from Django to Javascript. There's no real reason to have a backend
|
Move away from Django to Javascript. There's no real reason to have a backend
|
||||||
|
@ -25,7 +25,9 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "laundry.settings")
|
|||||||
# file. This includes Django's development server, if the WSGI_APPLICATION
|
# file. This includes Django's development server, if the WSGI_APPLICATION
|
||||||
# setting points here.
|
# setting points here.
|
||||||
from django.core.wsgi import get_wsgi_application
|
from django.core.wsgi import get_wsgi_application
|
||||||
application = get_wsgi_application()
|
from dj_static import Cling
|
||||||
|
|
||||||
|
application = Cling(get_wsgi_application())
|
||||||
|
|
||||||
# Apply WSGI middleware here.
|
# Apply WSGI middleware here.
|
||||||
# from helloworld.wsgi import HelloWorldApplication
|
# from helloworld.wsgi import HelloWorldApplication
|
||||||
|
14
requirements.txt
Normal file
14
requirements.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
BeautifulSoup==3.2.1
|
||||||
|
Django==1.6.5
|
||||||
|
MySQL-python==1.2.5
|
||||||
|
South==1.0
|
||||||
|
argparse==1.2.1
|
||||||
|
dj-database-url==0.3.0
|
||||||
|
dj-static==0.0.6
|
||||||
|
django-toolbelt==0.0.1
|
||||||
|
gunicorn==19.1.0
|
||||||
|
lxml==3.3.5
|
||||||
|
psycopg2==2.5.3
|
||||||
|
pygal==1.4.6
|
||||||
|
static3==0.5.1
|
||||||
|
wsgiref==0.1.2
|
Loading…
Reference in New Issue
Block a user