Create a file called context_processors.py, and insert this:
from django.conf import settings as django_settings
def settings(request):
return {'settings': django_settings}
Then, in settings.py, add this:
<html> | |
<head> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.1.2/handlebars.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
</head> | |
<body> | |
<!-- Your handlebars template goes below... --> | |
<script id="my-one-template" type="text/x-handlebars-template"> | |
{{#each people}} |
import re | |
from django.conf import settings | |
from django.core import cache as django_cache | |
from mock import patch | |
from rest_framework.permissions import SAFE_METHODS | |
from rest_framework.response import Response | |
class CachedResourceMixin (object): | |
@property |
from __future__ import unicode_literals | |
import base64 | |
import binascii | |
import os | |
import re | |
import logging | |
log = logging.getLogger(__name__) |
City | Cycling Deaths / 1M People | Pop (2010) | Approx # of Deaths | Cyclists as % of Pop | # of Cyclists (2010) | Deaths / 1K Cyclists | |
---|---|---|---|---|---|---|---|
Jacksonville | 5.68 | 823316 | 4.67643488 | 0.2 | 1647 | 2.8393654402 | |
Phoenix | 6.12 | 1449481 | 8.87082372 | 0.6 | 8697 | 1.0199866299 | |
Mesa | 6.05 | 440248 | 2.6635004 | 0.6 | 2641 | 1.0085196516 | |
Fresno | 5.98 | 496147 | 2.96695906 | 0.8 | 3969 | 0.7475331469 | |
Houston | 2.19 | 2107208 | 4.61478552 | 0.5 | 10536 | 0.4380016629 | |
New Orleans | 5.54 | 347858 | 1.92713332 | 1.8 | 6261 | 0.3077996039 | |
NYC | 2.1 | 8184899 | 17.1882879 | 0.8 | 65479 | 0.2625007697 | |
Los Angeles | 1.91 | 3797144 | 7.25254504 | 0.9 | 34174 | 0.2122240604 | |
Chicago | 2.22 | 2698831 | 5.99140482 | 1.3 | 35085 | 0.1707682719 |
{ | |
"id": 440, | |
"title": "Station Locations", | |
"phone": "+12159876034", | |
"start_date": "2014-08-22T17:31:26-04:00", | |
"end_date": null, | |
"confirmation": "Thanks again. There are approx. 90 proposed sites so if you see another sticker, text us from there!", | |
"public": false, | |
"questions": [ | |
{ |
Create a file called context_processors.py, and insert this:
from django.conf import settings as django_settings
def settings(request):
return {'settings': django_settings}
Then, in settings.py, add this:
class NewAlbum: | |
def leastAmountOfCDs(self, nSongs, length, cdCapacity): | |
# First, for kicks, let's just check whether all the songs fit on | |
# one CD | |
totalLength = nSongs * length | |
if totalLength <= cdCapacity: | |
return 1 | |
# If all the songs don't fit on one CD, start iterating through the |
GitHub may turn out to be a great resource for tracking kids' progress on projects. Commit messages can form the basis of a progress journal, as well as a built-in point of reflection after each session. Students can use them to summarize the work completed during the session. Volunteer instructors can refer back through the commit history to see kids process as they have been working on a project. Using the web interface and gh-pages may be a good, gentle introduction before getting into the command line.
module.exports = function(grunt) { | |
// Do grunt-related things in here | |
}; |