Just testing reST rendering.
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.db import models | |
class Person(models.Model): | |
name = models.CharField(max_length=200) | |
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people') | |
class Meta: | |
ordering = ['name'] | |
def __unicode__(self): |
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.db import models | |
from django.db.models import signals | |
class DeletingFileField(models.FileField): | |
""" | |
FileField subclass that deletes the refernced file when the model object | |
itself is deleted. | |
WARNING: Be careful using this class - it can cause data loss! This class | |
makes at attempt to see if the file's referenced elsewhere, but it can get |
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
# | |
# Run this under your WSGI server, and then try | |
# | |
# curl -N -i <server> | |
# | |
# If you're chunked, you should see the pause between "hello" and "world". | |
import time | |
def application(environ, start_response): |
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
CREATE TABLE CdmaCellLocation (MCC INTEGER, SID INTEGER, NID INTEGER, BSID INTEGER, ZONEID INTEGER, BANDCLASS INTEGER, CHANNEL INTEGER, PNOFFSET INTEGER, Timestamp FLOAT, Latitude FLOAT, Longitude FLOAT, HorizontalAccuracy FLOAT, Altitude FLOAT, VerticalAccuracy FLOAT, Speed FLOAT, Course FLOAT, Confidence INTEGER, PRIMARY KEY (MCC, SID, NID, BSID, ZONEID, BANDCLASS, CHANNEL, PNOFFSET)); | |
CREATE VIRTUAL TABLE CdmaCellLocationBoxes USING rtree(ROWID, MinimumLatitude, MaximumLatitude, MinimumLongitude, MaximumLongitude); | |
CREATE TABLE "CdmaCellLocationBoxes_node"(nodeno INTEGER PRIMARY KEY, data BLOB); | |
CREATE TABLE "CdmaCellLocationBoxes_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER); | |
CREATE TABLE "CdmaCellLocationBoxes_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER); | |
CREATE TABLE CdmaCellLocationCounts (Count INTEGER); | |
CREATE TABLE CdmaCellLocationHarvest (MCC INTEGER, MNC INTEGER, SID INTEGER, NID INTEGER, BSID INTEGER, BSLatitude FLOAT, BSLongitude FLOAT, ZoneID INTEGER, SectorID TEXT, SectorLatitud |
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
/Users/jacob/Projects/Django/.tox/py27sqlite/log$ ../bin/pip install --download-cache=/Users/jacob/Projects/Django/.tox/_download ../../dist/Django-1.3.zip >1.log | |
Unpacking /Users/jacob/Projects/Django/.tox/dist/Django-1.3.zip | |
Running setup.py egg_info for package from file:///Users/jacob/Projects/Django/.tox/dist/Django-1.3.zip | |
Installing collected packages: Django | |
Running setup.py install for Django | |
changing mode of build/scripts-2.6/django-admin.py from 644 to 755 | |
changing mode of /Users/jacob/Projects/Django/.tox/py27sqlite/bin/django-admin.py to 755 | |
Successfully installed Django | |
Cleaning up... |
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
INI_HEADER = '''[tox] | |
setupdir = {toxinidir}/upstream | |
''' | |
ENV_TEMPLATE = '''[testenv:%(envname)s] | |
basepython = python%(pyver)s | |
deps = %(deps)s | |
commands = | |
ln -sf {toxinidir}/testsettings {envdir}/lib/python%(pyver)s/site-packages | |
{toxinidir}/upstream/tests/runtests.py --settings=%(settings)s [] |
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
max = Math.max.apply.bind(Math.max, {}); | |
min = Math.min.apply.bind(Math.min, {}); | |
// Plot symbols just for the first, last, highest, and lowest values. | |
// gRaphael wants symbols to be an array of characters to write for | |
// each point. E.g. ['o', '', '', ..., 'o', ..., '', '', 'o'] | |
var symbols = data.values.map(function() { return '' }); | |
symbols[0] = 'o'; | |
symbols[symbols.length-1] = 'o'; | |
symbols[symbols.lastIndexOf(max(data.values))] = 'o'; |