https://gist.github.com/1341606
pip install Django
mkdir ~/django-heroku
cd ~/django-heroku
django-admin.py startproject mysite
cd mysite
python manage.py runserver
-
Keep the root dir in a variable
-
Set sqlite3 as db driver and provide the path to db file
-
Set media root path
-
Set templates path
python manage.py syncdb
2.4. Setup DMSL
STATIC_DEPS=true pip install lxml
pip install cython
mkdir ~/django-heroku/vendor
git clone git://github.com/dasacc22/dmsl.git ~/django-heroku/vendor/dmsl
cd ~/django-heroku/vendor/dmsl
sudo python setup.py install --record ../dmsl-install-files.txt
Then add DMSL settings
python manage.py startapp core
- Create templates for layout and page
- Add a view function
2.6. HamlPy templates
pip install hamlpy
pip install djaml
Add template loader.
Then create templates/index.haml
gem install sass
gem install compass
mkdir ~/django-heroku/mysite/media
cd ~/django-heroku/mysite/media
compass create compass [--using blueprint]
cd compass
compass watch
3.2. Less
npm install -g less
3.3. CoffeeScript
npm install -g coffee-script
3.4. django_compressor
pip install django-compressor
In order to work with HamlPy
pip install BeautifulSoup
Add settings http://django_compressor.readthedocs.org/en/latest/installation/ http://django_compressor.readthedocs.org/en/latest/settings/#compress-precompilers