Warning
These guidelines haven't been updated since 2016. Learn more…
Table of contents
Warning
These guidelines haven't been updated since 2016. Learn more…
Table of contents
Table of contents
| # -*- coding: utf-8 -*- | |
| """ | |
| Extremely fast Django test runner, based on the idea that your database schema | |
| and fixtures are changed much more seldom that your code and tests. All you | |
| need is to make sure that your "quickstart.sqlite" database file is always up | |
| to date. | |
| BEWARE: Don't run this test runner on production server. It assumes that you | |
| use only one database configured as "default", and its db engine is SQLite. | |
| Otherwise your tests can eat your data! |
| #!/bin/bash | |
| # To run do: | |
| # wget https://gist.github.com/raw/850359/ea02e22f021b7ebf2f602811461677ab4a3f2a9e/bootstrap.sh && chmod +x bootstrap.sh && ./bootstrap.sh && source ~/.profile | |
| # | |
| # Based on Amazon EC2 AMI ID ami-ccf405a5 Ubuntu Server 10.10 | |
| # This script will: | |
| # * install/config apache2 | |
| # * install mod_wsgi | |
| # * install/config nginx |
| """ | |
| jQuery templates use constructs like: | |
| {{if condition}} print something{{/if}} | |
| This, of course, completely screws up Django templates, | |
| because Django thinks {{ and }} mean something. | |
| Wrap {% verbatim %} and {% endverbatim %} around those | |
| blocks of jQuery templates and this will try its best |