Skip to content

Instantly share code, notes, and snippets.

View gcollazo's full-sized avatar

Giovanni Collazo gcollazo

View GitHub Profile
WSGIScriptAlias / /var/webapps/pony_site/django.wsgi
<Location "/">
Order Allow,Deny
Allow from all
</Location>
<Location "/static">
SetHandler None
</Location>
django
south
fabric
@gcollazo
gcollazo / fabfile.py
Created July 28, 2010 17:16 — forked from onyxfish/fabfile.py
Sample fabfile.py
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
======================================================
Setting up Django using Apache/mod_wsgi on Ubuntu 8.10
======================================================
This article will cover setting up Django using Apache/mod_wsgi on Ubuntu
8.10. The article is targeted at a production environment, but keep in mind
this is a more generalized environment. You may have different requirements,
but this article should at least provide the stepping stones.
The article will use distribution packages where nesscary. As of 8.10 the
$(document).ready(function(){
$("#theform").validity(function(){
$("#name").require().minLength(3);
$("#email").require().match("email");
});
});
.DS_Store
*.swp
*~.nib
build/
*.pbxuser
*.perspective
*.perspectivev3
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');
var old_data;
//Presentations
function presentations()
{
$.ajax({
url: '/jsonapi/presentations/',
type: 'POST',
dataType: 'json',
complete: function(xhr, textStatus) {
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteRule .* /maintenance.html [R=302,L]
</IfModule>