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
<Directory ~ ".*\.svn"> | |
Order allow,deny | |
Deny from all | |
Satisfy All | |
</Directory> |
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
Tweaked Django project template (based on django-admin.py startproject myproject). |
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
Tweaked django application templates (based on "django-admin startapp myapp") |
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
<!-- Load jQuery --> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("jquery", "1.3"); | |
</script> | |
<!-- Load jQuery build --> | |
<script type="text/javascript" src="<your installation path>/tiny_mce/tiny_mce.js"></script> | |
<script type="text/javascript"> | |
tinyMCE.init({ |
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
# SETUP A LOCAL COPY OF A REMOTE BRANCH | |
# From: the github branch called "foo-qa" | |
# To: local branch called "qa" | |
go -t -b qa origin/foo-qa | |
# REMOTE PUSH | |
# From: local branch called "qa" | |
# To: the github branch called "foo-qa" |
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
from models import * | |
from django import forms | |
from django.forms.util import ErrorList | |
class PatientAdminForm(forms.ModelForm): | |
class Meta: | |
model = Patient | |
def require_fields(self, *fields): |
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
from django.core.exceptions import ValidationError | |
from django.db.models import Field, CharField | |
__all__ = ['MultiColumnField'] | |
try: | |
from hashlib import md5 | |
except ImportError: | |
from md5 import new as md5 |
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
import gdata.docs.data | |
import gdata.docs.client | |
import re | |
def print_feed(feed): | |
if not feed.entry: | |
print 'No entries in feed.' | |
for entry in feed.entry: | |
print entry.title.text.encode('UTF-8'), entry.GetDocumentType(), entry.resource_id.text |
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
from piston.handler import BaseHandler | |
from myapp.models import Blogpost | |
class BlogpostHandler(BaseHandler): | |
allowed_methods = ('GET',) | |
model = Blogpost | |
# fields = ('title', 'description', ('tags', ('name'))) | |
def read(self, request, blogpost_id=None): | |
""" |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script> | |
<script src="http://www.plexical.com/sandbox/jsdeps/json2.js"></script> | |
<script src="http://www.plexical.com/sandbox/jsdeps/underscore.js"></script> | |
<script src="http://www.plexical.com/sandbox/jsdeps/backbone.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function(){ |
OlderNewer