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.template.defaultfilters import slugify | |
class Ingredient(models.Model): | |
name = models.CharField(max_length=200) | |
description = models.TextField(null=True, blank=True) | |
slug = models.SlugField(editable = False) | |
def __unicode__(self): | |
return u'%s' % (self.name) | |
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
def submit_form(request): | |
response = dict() | |
if request.method == 'POST': | |
af = AwesomeForm(request.POST) | |
if af.is_valid(): | |
af_field_variable = af.cleaned_data['awesome_field']) | |
messages.success(request, 'Thanks for the form data!') |
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
""" | |
This is an example of how to use optparse. | |
It may not be the best, but it's a start. | |
Invoke it from the command line: | |
python optest.py --help | |
python optest.py --test | |
python optest.py --message 'Goodbye Void' | |
""" |
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
use schema.org markup for ateoto.com | |
First steps with django-ateoto-dayboard: | |
Oauth2 support for Google Services. Need to access calendar API. | |
Grab weather forecast for the day from the Wunderground API. | |
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
http://senko.net/en/django-nginx-gunicorn/ |
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
class Animation(object): | |
def __init__(self, texture, | |
class AnimatedSprite(sf.Sprite): | |
def draw(self, target, states): | |
target.draw(self.texture) |
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 random | |
import re | |
def roll(what_roll): | |
""" | |
d20 | |
d6+2 | |
2d6 | |
4d6+4 | |
""" |
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
For a ~16oz Chemex Cup | |
18oz H20 | |
21g Coffee |
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
http://knockoutjs.com/ | |
http://kmalakoff.github.com/knockback/ |
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
upstream django { | |
server localhost:8000; | |
} | |
server { | |
listen 80; | |
server_name ateoto.com; | |
location / { | |
proxy_pass http://django; |
OlderNewer