You are on page 1of 1

TextMate Python/Django/ReST Cheat Sheet

PYTHON COMMANDS ⌃⌥⇧P DJANGO COMMANDS DJANGO TEMPLATE ⌃⌥⇧D

Pydoc for curr. selection F3 Search djangoproject ⌃H Add filter ⌘|

Run script in terminal ⌘⇧R Block {% tag %} ⌃%

Run UnitTests ⌥⌘⇧R Comment {# tag #} ⌃#

Execute line/selection ⌃⇧E DJANGO SNIPPETS Variable {{ tag }} ⌃{

Debug script in terminal ⇧⌘D mail.sendmail function sendmail⇥

Pydoc in browser ⌃⇧H TEMPLATE SNIPPETS

Copy curr. block symbol ⌃⌥C template function name ...⇥

Show curr. block symbol ⌃⌥P DJANGO FIELDS Templatetag openblock {%⇥

Field name, lc, w/o “Field” ...⇥ Templatetag closeblock %}⇥

ForeignKey fk⇥ Templatetag openvar {{⇥

Templatetag closevar }}⇥

PYTHON SNIPPETS ReST SNIPPETS

If name == main block ifmain⇥ Section tag sec⇥

New property property⇥ Subsection tag subs⇥ ReST COMMANDS ⌃⌥⇧R

self. .⇥ Subsubsection tag sss⇥ Convert to HTML ⌃⇧H

Try/except blocks try⇥ Link tag link⇥ Goto next section ⌘~

__magic__ __⇥ Image tag image⇥ Create HTML/XML/S5 ⌘R

TextMate Python/Django/ReST Cheat Sheet