Skip to content

Instantly share code, notes, and snippets.

View shepelevstas's full-sized avatar
😁

Shepelev Stas shepelevstas

😁
  • Russia, Krasnoyarsk
View GitHub Profile
@paulsmith
paulsmith / verbatim_templatetag.py
Created October 25, 2011 19:03 — forked from ericflo/verbatim_templatetag.py
verbatim Django template tag
"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best
@JulienPalard
JulienPalard / curry.py
Created August 1, 2014 10:51
KISS Python curry
#!/usr/bin/env python
def curry(func):
"""
Decorator to curry a function, typical usage:
>>> @curry
... def foo(a, b, c):
... return a + b + c
@penpenps
penpenps / index.html
Created September 24, 2015 02:40
Use XMLHttpRequest to upload file and handle it by Django
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" >
<title>XMLHttpRequest send file demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--set Document Mode to IE=edge -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Le styles -->