I hereby claim:
- I am jdunck on github.
- I am jdunck (https://keybase.io/jdunck) on keybase.
- I have a public key whose fingerprint is 8801 066B D85C 57BA 0D02 8BF9 A4EA DF1F 0080 A663
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| def instance_in_qs(instance_or_pk, qs): | |
| if qs._result_cache is None: | |
| if qs.query.can_filter(): | |
| pk = getattr(instance_or_pk, 'pk', instance_or_pk) | |
| return qs.filter(pk=pk).exists() | |
| else: | |
| objs = list(qs) | |
| else: | |
| objs = qs._result_cache | |
| $ find . -name '*.html' | xargs grep -h '{% extends' | sed -e "s/'/\"/g" | sort | uniq -c | sort -n | |
| 1 <!DOCTYPE html>{% extends "common/templates/responsive_base.html" %} | |
| 1 {% extends "admin/change_form.html" %} | |
| 1 {% extends "admin/index.html" %} | |
| 1 {% extends "base.html" %} | |
| 1 {% extends "common/templates/blank.html" %} | |
| 1 {% extends "common/templates/donut-base.html" %} | |
| 1 {% extends "messaging/templates/email/base_ss_email_to_user.html" %} | |
| 1 {% extends "provider/templates/preview_base.html" %} | |
| 1 {% extends "rate-appointment-form-base.html" %} |
| test: | |
| override: | |
| - find . -maxdepth 1 -type d -not -name . > test_dirs: | |
| parallel: true | |
| - python circle_node_to_dirs.py < test_dirs > test_dirs_for_node: | |
| parallel: true | |
| - echo "Testing `cat test_dirs_for_node`": | |
| parallel: true | |
| - py.test `cat test_dirs_for_node`: | |
| parallel: true |
| def uncompress_string(c): | |
| from io import BytesIO | |
| from gzip import GzipFile | |
| zbuf = BytesIO(c) | |
| with GzipFile(mode='rb', compresslevel=6, fileobj=zbuf) as zfile: | |
| return zfile.read() | |
| class ForceDebugJSONMiddleware(object): | |
| def process_response(self, request, response): | |
| """Add html, head, and body tags so debug toolbar will activate.""" |
| from psycopg2.extras import DictCursor | |
| from django.db import connections | |
| def get_cursor(alias='default', cursor_factory=None): | |
| # map from django's ORM layer to the raw DB cursor. | |
| wrapped_conn = connections[alias] | |
| # hack to ensure connection is immediately opened: | |
| if wrapped_conn.connection is None: |
| depends_on = ( | |
| ('about', '0004_fake_user_fk'), | |
| ('accounts', '0029_auto__del_registration'), | |
| ('activity_feed', '0002_fake_user_fk'), | |
| ('analytics', '0006_add_labels'), | |
| ('art', '0036_auto__chg_field_packpurchase_royalty_millicents_per_credit__chg_field_'), | |
| ('bots', '0002_fake_user_fk'), | |
| ('comments', '0002_fake_user_fk'), | |
| ('core', '0012_auto__del_field_creatorprofile_points_balance__add_field_creatorprofil'), | |
| ('creator', '0002_fake_user_fk'), |
| def uncompress_string(c): | |
| from io import BytesIO | |
| from gzip import GzipFile | |
| zbuf = BytesIO(c) | |
| with GzipFile(mode='rb', compresslevel=6, fileobj=zbuf) as zfile: | |
| return zfile.read() | |
| class ForceDebugJSONMiddleware(object): | |
| def process_response(self, request, response): | |
| """Add html, head, and body tags so debug toolbar will activate.""" |
| find . -not \( -path '*node_module*' -o -path '*.git*' -o -path '*jasmine*' -o -path '*assets*' -o -type d \) | xargs grep -in -E '(\bhe\b)|(\bhis\b)|(\bher\b)|(\b\she\b)' |