Skip to content

Commit ef739f4

Browse files
author
drew
committed
Add readme and example file
1 parent ef10355 commit ef739f4

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

guideapp/secrets.example.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
def secretKey():
3+
return 'YOUR SECRET KEY'
4+
5+
def databaseConfig():
6+
db = {
7+
'default': {
8+
'ENGINE': 'django.db.backends.postgresql_psycopg2',
9+
'NAME': 'DATABASE',
10+
'USER': 'USER',
11+
'PASSWORD': 'PASSWORD',
12+
'HOST': 'localhost',
13+
'PORT': '',
14+
}
15+
}
16+
17+
return db

readme.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Oakland Web guide
2+
3+
## Introduction
4+
5+
This a the web version of the Oakland Guide application. The other parts of this application are a CMS ([github](https://github.com/CMP-Studio/cmoa-app-cms)) and iOS application ([github](https://github.com/CMP-Studio/cmoa-app-ios)). It's purpose is to have a device non-specific way to view the content of the iOS application.
6+
7+
## Limitations
8+
9+
Due to this being a website it will not have access to the iBeacon stack of the native iOS application and can therefore not give location-aware notifications. Other than that it should be a very similar experience.
10+
11+
## Installing
12+
13+
1. This is a [Django Framework](https://www.djangoproject.com/) application. start by installing Django 1.9.5 and it's requirements
14+
2. Install [Nginx](https://www.nginx.com/)
15+
3. Install [Postgres](http://www.postgresql.org/)
16+
4. Pull this repo to a location on the server you want to serve this application from.
17+
5. Install the other requirements by using `pip install -r requirements.txt` (you can also view requirements.txt to see what pythong packages it uses)
18+
6. Configure the application to your setup (see below)
19+
7. Copy the nginx file to the sites-avalible folder and link it to the sites-enabled (if you are using the default nginx site this file will need to be modified)
20+
8. Start up the gunicorn server using `sudo ./start.sh` and you should be running.
21+
22+
## Configuration
23+
24+
There are several places that have configurations
25+
* guideapp/secrets.py - with the database configuration and a secret key for Django to use. This is ignored by git for obvious reasons so I've included an example @ secrets.example.py
26+
* guideapp/settings.py - API settings at the bottom point to locations dependent on the CMS location
27+
* nginx - nginx config file, make sure all filepaths in that file go to where you put this application
28+
* .sh scripts - both scripts have filepaths to the application
29+
* crontab - Use `crontab -e` to make update.sh run periodically to update from the CMS

0 commit comments

Comments
 (0)