This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
jQuery templates use constructs like: | |
{{if condition}} print something{{/if}} | |
This, of course, completely screws up Django templates, | |
because Django thinks {{ and }} means something. | |
Wrap {% verbatim %} and {% endverbatim %} around those | |
blocks of jQuery templates and this will try its best |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# old database must be idle (no held open connections or write transactions) | |
sudo -u postgres createdb newdatabase -T olddatabase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# proxy traffic from original to new machine to allow for smooth DNS transfers | |
# Set new-www.therealserver.com up in /etc/hosts on the original machine | |
<VirtualHost *:80> | |
ServerName www.therealservername.com | |
RewriteEngine On | |
RewriteRule ^(.*)$ http://new-www.therealservername.com$1 [P,L] | |
ProxyPass / http://new-www.therealservername.com/ | |
ProxyPreserveHost On | |
<Proxy *> | |
Allow from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName www.yoursite.com | |
ServerAdmin hosting@yourdomain.com | |
DocumentRoot /var/local/sites/www.yoursite.com/emergency | |
RewriteEngine On | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f | |
RewriteCond %{ENV:REDIRECT_STATUS} !=503 | |
RewriteRule ^ - [L,R=503] | |
# Make sure index.html doesn't exist |