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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var a = new Audio(); | |
var sources = [ | |
'http://www.pacdv.com/sounds/fart-sounds/fart-2.wav', | |
'http://www.pacdv.com/sounds/fart-sounds/fart-3.wav', |
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
<script> | |
var a = new Audio(); | |
var sources = [ | |
'topsecret1.wav', | |
'topsecret2.wav', | |
'topsecret3.wav']; | |
function playSound() { | |
var i = Math.floor(Math.random()*3); | |
a.pause(); |
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
# models (old) | |
class Team(models.Model): | |
# ... | |
attachments = models.ManyToManyField(Attachment, blank=True, | |
related_name="%(app_label)s_%(class)s_attachments") | |
images = models.ManyToManyField(ImageAttachment, blank=True, | |
related_name="%(app_label)s_%(class)s_images") | |
links = models.ManyToManyField(Link, blank=True, | |
related_name="%(app_label)s_%(class)s_links") |
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
# teams/urls.py | |
urlpatterns = patterns('teams.views', | |
... | |
url(r'^create/?$', 'create'), | |
... | |
) | |
# teams/models.py | |
class Team(models.Model): |
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
# settings.py | |
import os | |
VENV_ROOT = os.environ.get('VIRTUAL_ENV', '') | |
MEDIA_ROOT = VENV_ROOT + '/media/' | |
MEDIA_URL = '/media/' | |
# urls.py | |
urlpatterns = patterns('', | |
# ... |