This is a django template for gliacloud
To install django, type the following command
sudo pip install django
To create the project, run the following command and please replace your_project_name to what you like :
django-admin.py startproject --template=https://github.com/livingbio/django-template/archive/master.zip --extension=py,md,yml,ini your_project_name
At first, you should make sure you have virtualenv installed.
after that, just cd to your_project_name:
cd your_project_name
Then create your virtualenv:
virtualenv venv
Second, you need to enable the virtualenv by
source venv/bin/activate
Install all dependencies:
pip install -r requirements.txt
Settings are stored in environment variables via django-environ. The quickiest way to start is to copy and rename local.sample.env
into local.env
:
cp src/autoplay/settings/local.sample.env src/autoplay/settings/local.env
Then edit the SECRET_KEY in local.env file, replace bg8d7k^m*tf@(=$45_mq2lnmd*!-hyo#*szb5zm$o)m=ma@9tt
into any Django Secret Key, for example:
SECRET_KEY=twvg)o_=u&@6^*cbi9nfswwh=(&hd$bhxh9iq&h-kn-pff0&&3
After that, just cd to src
folder:
cd src
And run migrate and http server:
python manage.py migrate
python manage.py runserver
You can use mkdocs to write beatuiful documentations. By typing:
mkdocs serve
Then you can see your document in http://localhost:8001/
Take a look at the docs for more information.