I hereby claim:
- I am joncotton on github.
- I am joncotton (https://keybase.io/joncotton) on keybase.
- I have a public key whose fingerprint is 0FED 542A 1506 2BB8 5294 A498 B347 4256 CC96 C254
To claim this, I am signing this object:
| <!-- | |
| From "The Minimalist" Tumblr Theme | |
| http://www.tumblr.com/theme/12051 | |
| In addition to having no semantic meaning whatsoever, | |
| the tag structure of this headline makes it very difficult | |
| to select for copy/pasting. | |
| That said, I do like the theme. | |
| --> |
| """ | |
| A working `render_model with` that works like Django's include templatetag. It's a gist because it's not official enough to fork&commit. There are no tests and `with` isn't implemented on the other `render` tags. | |
| """ | |
| from django.conf import settings | |
| from django.template.loader_tags import BaseIncludeNode | |
| from django.template.defaulttags import token_kwargs | |
| # class RenderObjectNode(template.Node): |
| /** | |
| * A bookmarklet to Clippify any webpage. | |
| * | |
| * All possible by: http://www.smore.com/clippy-js | |
| */ | |
| javascript:(function(){function c(a,b){console.log("dynamically loading-",a);if(a.readyState){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){a.onreadystatechange=null;if(b){b()}}}}else{a.onload=function(){if(b){b()}}}}function d(){console.log("launching clippy");clippy.load("Clippy",function(a){$(".clippy").css("position","fixed");$(".clippy").css("z-index",1e3);a.show();a.moveTo(100,100)})}function e(){b=document.createElement("script");b.src="https://raw.github.com/smore-inc/clippy.js/master/build/clippy.js";document.body.appendChild(b);var a=document.createElement("link");a.rel="stylesheet";a.type="text/css";a.media="all";a.href="https://raw.github.com/smore-inc/clippy.js/master/build/clippy.css";document.getElementsByTagName("head")[0].appendChild(a)}var a;var b;if(typeof jQuery=="undefined"||jQuery.fn.jquery<"1.7"){a=document.createElement("script");var f=/^https:/ |
| javascript:(function(){html=document.getElementsByTagName('html')[0];html.classList.add('is-tablet');document.getElementsByClassName('family-branding')[0].style.position='absolute';})() |
| #! /bin/sh | |
| echo "Purging pyc files and empty directories..." | |
| # Start from the repository root. | |
| cd ./$(git rev-parse --show-cdup) | |
| # Delete .pyc files, empty directories and MacOS cruft | |
| find . -name '*.pyc' -delete 2>&1 > /dev/null & | |
| find . -type d -empty -delete 2>&1 > /dev/null & | |
| find . -type f -name '.DS_Store' -delete 2>&1 > /dev/null & |
| # actual database config | |
| DATABASES = { | |
| 'default': local | |
| # 'default': PRODUCTION | |
| } | |
| if DATABASES['default'] == PRODUCTION: | |
| import warnings |
| # Tox (http://tox.testrun.org/) is a tool for running tests | |
| # in multiple virtualenvs. This configuration file will run the | |
| # test suite on all supported Python/Django versions. | |
| # To use it, "pip install tox" and then run "tox". | |
| [tox] | |
| envlist = py27_django13, py27_django14, py27_django15, py27_django16 | |
| downloadcache = {toxworkdir}/.cache | |
| [testenv] |
| def get_queryset(self): | |
| """Use the same ordering as TreeManager""" | |
| args = (self.model._mptt_meta.tree_id_attr, | |
| self.model._mptt_meta.left_attr) | |
| method = 'get_query_set' if django.VERSION < (1, 6) else 'get_queryset' | |
| return getattr(super(SectionManager, self), method)().order_by(*args) | |
| if django.VERSION < (1, 6): | |
| def get_query_set(self): |
I hereby claim:
To claim this, I am signing this object: