Skip to content

Instantly share code, notes, and snippets.

View cezar77's full-sized avatar

Cezar Pendarovski cezar77

View GitHub Profile
@cezar77
cezar77 / drf_before.html
Created August 25, 2014 14:40
Django REST Framework 2.3.14 - rendered HTML
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="robots" content="NONE,NOARCHIVE" />
@cezar77
cezar77 / drf_after.html
Created August 25, 2014 14:41
Django REST Framework - proposal for 3.x - rendered HTML
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="robots" content="NONE,NOARCHIVE" />
@cezar77
cezar77 / drf_pre_with_div.html
Created August 28, 2014 08:33
Django REST Framework 2.3.14 - rendered HTML with <div class="meta nocode">
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@cezar77
cezar77 / drf_pre_with_span.html
Created August 28, 2014 08:35
Django REST Framework 2.3.14 - rendered HTML with <span class="meta nocode">
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@cezar77
cezar77 / 47808863.py
Created December 15, 2017 08:26
Break long lines in Python without using backslash (SO question 47808863)
orders = Order.objects.filter(
adjustments__type='payment',
adjustments__location__isnull=False,
status__gte=200,
status__lt=300
).exclude(
adjustments__location__zipcode__in=['', '0000', '00000', 0000, 00000]
).values(
# 'id',
'adjustments__location__city',