This file contains hidden or 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
!!! 5 | |
//if lt IE 7 <html class="no-js ie6 oldie" lang="en"> | |
//if IE 7 <html class="no-js ie7 oldie" lang="en"> | |
//if IE 8 <html class="no-js ie8 oldie" lang="en"> | |
// [if gt IE 8] <! | |
html(class="no-js", lang="en") | |
// <!--<![endif] | |
head |
This file contains hidden or 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 | |
window.jQuery || document.write("<script src=/lib/jquery-1.6.2.min.js></script>"); |
This file contains hidden or 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.contrib.gis.db import models | |
from django.contrib.auth.models import User | |
from django.conf import settings | |
auto_approve_comments = getattr(settings, 'COMMENTS_AUTO_APPROVE', True) | |
class Place(models.Model): | |
""" For maintaining a database of different places. """ | |
location = models.PointField() |
This file contains hidden or 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='window.jQuery || document.write("<script src=/lib/jquery-1.6.2.min.js></script>");' |
This file contains hidden or 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 BlogForm(models.Model): | |
display_name = models.CharField(max_length=32) | |
form_class = models.CharField(max_length=128) | |
# Implement a way to import `form_class` and render the form. | |
class BlogPost(models.Model): | |
# Basic blog stuff. | |
form = models.ForeignKey(BlogForm) |
This file contains hidden or 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 ResponseType(models.Model): | |
# If you want people to rate others' responses, for instance. This | |
# provides context on why this specific pattern is useful. Also, | |
# consider aggregate functions over multiple data types. | |
rating = models.PositiveIntegerField() | |
class StringResponseType(ResponseType): | |
value = models.CharField(max_length=128) | |
class BooleanResponseType(ResponseType): |
This file contains hidden or 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
!!! 5 | |
//if lt IE 7 <html class="no-js ie6 oldie" lang="en"> | |
//if IE 7 <html class="no-js ie7 oldie" lang="en"> | |
//if IE 8 <html class="no-js ie8 oldie" lang="en"> | |
// [if gt IE 8] <! | |
html(class="no-js", lang="en") | |
// <![endif] | |
head |
This file contains hidden or 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
function five_middleware (req, res, next) { | |
req.five = 5; | |
next(); | |
} |
This file contains hidden or 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
(function ($) { | |
// jQuery here. | |
})(jQuery); |
This file contains hidden or 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
end | |
end | |
end | |
end | |
# wtf. |