To survey and gather relevant user data tored on SoGE Infrastructure.
app
├── __init__.py
├── decorators.py
├── email.py
├── forms.py
├── mixins.py
├── models.py
├── static
│ └── (asset files: CSS/JS/images)
├── templates
│ └── (HTML template files)
└── views.py
manage.py
config.py
config.py
- will hold all configuration values for the application runtime - LOCAL FILE
You are strongly encouraged to use a virtual environment for development, and virtualenv wrapper is the way to go.
Whether you use a virtualenv or not your first step is to install your Python dependencies:
- with virtualenv wrapper
$ mkvirtualenv survey_env -r requirements.txt
- without virtualenv wrapper
$ pip install -r requirement.txt
requirements.txt
holds a record of all packaged Python dependencies. If you update or add any packages, please remember to run:
$ pip freeze > requirements.txt
Configuration specifications will come in a later update. For now these are the config variables that will be utilized.
SQLALCHEMY_DATABASE_URI
SQLALCHEMY_ECHO
DATABASE_QUERY_TIMEOUT
To initialize the database, run:
$ python manage.py initdb
To run the application in your development environment. After you initialize your database;
$ python manage.py runserver
The development server should start in DEBUG
mode (this is specified in you config file) and with the reloader:
$ python manage.py runserver
* Running on http://127.0.0.1:5000/
* Restarting with reloader
$ python manage.py write_output to get the csv output file
All packaged Python dependencies can be found in requirements.txt
and are managed using pip
.
Most other packages (related to the application's front end) are managed with Bower and you can see this list in bower.json
.
The style for the applications front end is based on Bootstrap but is customized by using a modified bootstrap swatch theme from Bootswatch, namely 'Darkly'.
The custom style sheet is located in app/static/bootswatch
.
We update styles by modifying the LESS files. These are compiled using Grunt:
$ grunt swatch:darkly
Running "swatch:darkly" (swatch) task
...
Done, without errors.