-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.rst
92 lines (63 loc) · 2.6 KB
/
README.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
=====================
LightMatter Django Template
ABOUT
=====================
A generic template for Django 1.6
Instructions
=====================
Follow the steps below to start a new project using this django template::
$ django-admin.py startproject --template=https://github.com/Lightmatter/generic-django-conf/archive/master.zip --extension=py,rb,sh,yml,project_name --name=Procfile <project_name>
$ cd <project_name>
$ chmod +x start.sh
$ ./start.sh
$ workon <project_name>
$ python <project_name>/manage.py runserver
Deployment
=====================
This is ment to be deployed on the heroku
Create a heroku application and push the code there. You will need to set:
- The DJANGO_SETTINGS_MODULE variable to either "{{project_name}}.settings.heroku" or heroku_staging
- The aws settings in AWS_SECRET_ACCESS_KEY, AWS_STORAGE_BUCKET_NAME, AWS_ACCESS_KEY_ID
- and finally the SECRET_ACCESS_KEY which can be generated via ```python -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'```
You can set the variables using the heroku command, the config:set argument and the --app flag:
```heroku config:set DJANGO_SETTINGS_MODULE={{project_name}}.settings.heroku-staging```
or
```heroku config:set SECRET_KEY=`python -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'````
Use the Mandrill addon to setup email -
```$ heroku addons:add mandrill:starter```
Make sure to add psql backup
```$ heroku addons:add pgbackups```
Add in the newrelic addon:
```$ heroku addons:add newrelic```
After pushing the code, you'll need to syncdb and run the initial migrations:
```$ heroku run python manage.py syncdb --migrate```
Release notes
=============
Version 0.1.3 (2014-07-7)
--------------------------
* bug fixes and updates to readme
Version 0.1.2 (2014-07-7)
--------------------------
* Adding in Easy-thumbnails
* Restructing heroku settings in a better format
* Adding in redis for caching
Version 0.1.1 (2014-07-7)
--------------------------
* Adding in django smuggler
* Adding in error message for manage.py to check to ensure your django settings env variable is set
Version 0.1 (2014-07-7)
--------------------------
* First Numbered release
Todo
=====================
Things we still want to do::
caching everything possible (middleware for sure)
Setting up heroku optimg/jpgopti and combining with thumbnail
404/403 ect
500 page
user useradmin
click jacking
django-secure
avatars by default
setup django crispy and floppy
django-htmlmin