\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Admoroux (Admoroux)} \pdfinfo{ /Title (djaneiro.pdf) /Creator (Cheatography) /Author (Admoroux (Admoroux)) /Subject (Djaneiro Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{3FA32F} \definecolor{LightBackground}{HTML}{F3F9F2} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Djaneiro Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Admoroux (Admoroux)} via \textcolor{DarkBackground}{\uline{cheatography.com/25539/cs/6720/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Admoroux (Admoroux) \\ \uline{cheatography.com/admoroux} \\ \uline{\seqsplit{retrofrikis}.com/} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 29th April, 2017.\\ Updated 29th April, 2017.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{1.76 cm} x{6.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Django templates}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{autoescape} & `\{\% autoescape \%\} \{\% autoescape \%\}` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} block & `\{\% block \%\} \{\% endblock \%\}` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} comment & `\{\% comment \%\} \{\% endcomment \%\}` \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} csrf & `\{\% csrf\_token \%\}` \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} cycle & `\{\% cycle \%\}` \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} debug & `\{\% debug \%\}` \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} ext & `\{\% extends "" \%\}` \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} extends & `\{\% extends "" \%\}` \tn % Row Count 10 (+ 1) % Row 8 \SetRowColor{LightBackground} filter & `\{\% filter \%\} \{\% endfilter \%\}` \tn % Row Count 11 (+ 1) % Row 9 \SetRowColor{white} firstof & `\{\% firstof \%\}` \tn % Row Count 12 (+ 1) % Row 10 \SetRowColor{LightBackground} for & `\{\% for in \%\} \{\% endfor \%\}` \tn % Row Count 13 (+ 1) % Row 11 \SetRowColor{white} fore & `\{\% for in \%\} \{\% empty \%\} \{\% endfor \%\}` \tn % Row Count 15 (+ 2) % Row 12 \SetRowColor{LightBackground} if & `\{\% if \%\} \{\% endif \%\}` \tn % Row Count 16 (+ 1) % Row 13 \SetRowColor{white} \seqsplit{ifchanged} & `\{\% ifchanged \%\} \{\% endifchanged \%\}` \tn % Row Count 18 (+ 2) % Row 14 \SetRowColor{LightBackground} ife & `\{\% if \%\} \{\% else \%\} \{\% endif \%\}` \tn % Row Count 20 (+ 2) % Row 15 \SetRowColor{white} ifelse & `\{\% if \%\} \{\% else \%\} \{\% endif \%\}` \tn % Row Count 22 (+ 2) % Row 16 \SetRowColor{LightBackground} ifeq & `\{\% ifequal \%\} \{\% endifequal \%\}` \tn % Row Count 24 (+ 2) % Row 17 \SetRowColor{white} ifequal & `\{\% ifequal \%\} \{\% endifequal \%\}` \tn % Row Count 26 (+ 2) % Row 18 \SetRowColor{LightBackground} \seqsplit{ifnotequal} & `\{\% ifnotequal \%\} \{\% endifnotequal \%\}` \tn % Row Count 28 (+ 2) % Row 19 \SetRowColor{white} inc & `\{\% include \%\}` \tn % Row Count 29 (+ 1) % Row 20 \SetRowColor{LightBackground} include & `\{\% include \%\}` \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.76 cm} x{6.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Django templates (cont)}} \tn % Row 21 \SetRowColor{LightBackground} load & `\{\% load \%\}` \tn % Row Count 1 (+ 1) % Row 22 \SetRowColor{white} now & `\{\% now "" \%\}` \tn % Row Count 2 (+ 1) % Row 23 \SetRowColor{LightBackground} regroup & `\{\% regroup by as \%\}` \tn % Row Count 3 (+ 1) % Row 24 \SetRowColor{white} \seqsplit{spaceless} & `\{\% spaceless \%\} \{\% endspaceless \%\}` \tn % Row Count 5 (+ 2) % Row 25 \SetRowColor{LightBackground} ssi & `\{\% ssi \%\}` \tn % Row Count 6 (+ 1) % Row 26 \SetRowColor{white} static & `\{\% static \%\}` \tn % Row Count 7 (+ 1) % Row 27 \SetRowColor{LightBackground} \seqsplit{templatetag} & `\{\% templatetag \%\}` \tn % Row Count 9 (+ 2) % Row 28 \SetRowColor{white} url & `\{\% url \%\}` \tn % Row Count 10 (+ 1) % Row 29 \SetRowColor{LightBackground} \seqsplit{verbatim} & `\{\% verbatim \%\} \{\% endverbatim \%\}` \tn % Row Count 12 (+ 2) % Row 30 \SetRowColor{white} \seqsplit{widthratio} & `\{\% widthratio \%\}` \tn % Row Count 14 (+ 2) % Row 31 \SetRowColor{LightBackground} with & `\{\% with as \%\} \{\% endwith \%\}` \tn % Row Count 15 (+ 1) % Row 32 \SetRowColor{white} trans & `\{\% trans \%\}` \tn % Row Count 16 (+ 1) % Row 33 \SetRowColor{LightBackground} \seqsplit{blocktrans} & `\{\% blocktrans with as \%\} \{\% endblocktrans \%\}` \tn % Row Count 18 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.6 cm} x{6.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Non-official snippets for templates}} \tn % Row 0 \SetRowColor{LightBackground} super & `\{\{ block.super \}\}` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \seqsplit{extrahead} & `\{\% block extrahead \%\}\{\% endblock extrahead \%\}` \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{extrastyle} & `\{\% block extrastyle \%\}\{\% endblock extrastyle \%\}` \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} var & `\{\{ \}\}` \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} tag & `\{\% \%\}` \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} staticu & `\{\{ STATIC\_URL \}\}` \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} media & `\{\{ MEDIA\_URL \}\}` \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.92 cm} x{6.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Django model fields}} \tn % Row 0 \SetRowColor{LightBackground} mauto & `models.AutoField()` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} mbigint & \seqsplit{`models.BigIntegerField()`} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} mbool & `models.BooleanField()` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} mchar & \seqsplit{`models.CommaSeparatedIntegerField()`} \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} mdate & `models.DateField()` \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \seqsplit{mdatetime} & `models.DateTimeField()` \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} mdecimal & `models.DecimalField()` \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} \seqsplit{mduration} & `models.DurationField()` \tn % Row Count 9 (+ 1) % Row 8 \SetRowColor{LightBackground} memail & `models.EmailField()` \tn % Row Count 10 (+ 1) % Row 9 \SetRowColor{white} mfile & `models.FileField()` \tn % Row Count 11 (+ 1) % Row 10 \SetRowColor{LightBackground} \seqsplit{mfilepath} & `models.FilePathField()` \tn % Row Count 12 (+ 1) % Row 11 \SetRowColor{white} mfloat & `models.FloatField()` \tn % Row Count 13 (+ 1) % Row 12 \SetRowColor{LightBackground} mimg & `models.ImageField()` \tn % Row Count 14 (+ 1) % Row 13 \SetRowColor{white} mint & `models.IntegerField()` \tn % Row Count 15 (+ 1) % Row 14 \SetRowColor{LightBackground} mip & \seqsplit{`models.IPAddressField()`} \tn % Row Count 16 (+ 1) % Row 15 \SetRowColor{white} \seqsplit{mnullbool} & \seqsplit{`models.NullBooleanField()`} \tn % Row Count 17 (+ 1) % Row 16 \SetRowColor{LightBackground} mphone & \seqsplit{`models.PhoneNumberField()`} \tn % Row Count 18 (+ 1) % Row 17 \SetRowColor{white} mposint & \seqsplit{`models.PositiveIntegerField()`} \tn % Row Count 20 (+ 2) % Row 18 \SetRowColor{LightBackground} \seqsplit{mpossmallint} & \seqsplit{`models.PositiveSmallIntegerField()`} \tn % Row Count 22 (+ 2) % Row 19 \SetRowColor{white} mslug & `models.SlugField()` \tn % Row Count 23 (+ 1) % Row 20 \SetRowColor{LightBackground} \seqsplit{msmallint} & \seqsplit{`models.SmallIntegerFiled()`} \tn % Row Count 24 (+ 1) % Row 21 \SetRowColor{white} mtext & `models.TextField()` \tn % Row Count 25 (+ 1) % Row 22 \SetRowColor{LightBackground} mtime & `models.TimeField()` \tn % Row Count 26 (+ 1) % Row 23 \SetRowColor{white} murl & `models.URLField()` \tn % Row Count 27 (+ 1) % Row 24 \SetRowColor{LightBackground} musstate & `models.USStateField()` \tn % Row Count 28 (+ 1) % Row 25 \SetRowColor{white} mxml & `models.XMLField()` \tn % Row Count 29 (+ 1) % Row 26 \SetRowColor{LightBackground} fk & `models.ForeignKey()` \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.92 cm} x{6.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Django model fields (cont)}} \tn % Row 27 \SetRowColor{LightBackground} m2m & \seqsplit{`models.ManyToManyField()`} \tn % Row Count 1 (+ 1) % Row 28 \SetRowColor{white} o2o & `models.OneToOneField()` \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.92 cm} x{6.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Django form fields}} \tn % Row 0 \SetRowColor{LightBackground} fchar & `forms.CharField()` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} fchoice & `forms.ChoiceField()` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} fcombo & `forms.ComboField()` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} fdate & `forms.DateField()` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \seqsplit{fdatetime} & `forms.DateTime()` \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} fdecimal & `forms.DecimalField()` \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \seqsplit{fduration} & `forms.DurationField()` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} femail & `forms.EmailField()` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} ffile & `forms.FileField()` \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} \seqsplit{ffilepath} & `forms.FilePathField()` \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} ffloat & `forms.FloatField()` \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} fimg & `forms.ImageField()` \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} fint & `forms.IntegerField()` \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} fip & `forms.IPAddressField()` \tn % Row Count 14 (+ 1) % Row 14 \SetRowColor{LightBackground} \seqsplit{fmochoice} & \seqsplit{`forms.ModelChoiceField()`} \tn % Row Count 15 (+ 1) % Row 15 \SetRowColor{white} \seqsplit{fmomuchoice} & \seqsplit{`forms.ModelMultipleChoiceField()`} \tn % Row Count 17 (+ 2) % Row 16 \SetRowColor{LightBackground} \seqsplit{fmuchoice} & \seqsplit{`forms.MultipleChoiceField()`} \tn % Row Count 18 (+ 1) % Row 17 \SetRowColor{white} fmuval & \seqsplit{`forms.MultipleValueField()`} \tn % Row Count 19 (+ 1) % Row 18 \SetRowColor{LightBackground} \seqsplit{fnullbool} & \seqsplit{`forms.NullBooleanField()`} \tn % Row Count 20 (+ 1) % Row 19 \SetRowColor{white} fregex & `forms.RegexField()` \tn % Row Count 21 (+ 1) % Row 20 \SetRowColor{LightBackground} fslug & `forms.SlugField()` \tn % Row Count 22 (+ 1) % Row 21 \SetRowColor{white} \seqsplit{fsdatetime} & `forms.SplitDateTime()` \tn % Row Count 24 (+ 2) % Row 22 \SetRowColor{LightBackground} ftime & `forms.TimeField()` \tn % Row Count 25 (+ 1) % Row 23 \SetRowColor{white} ftchoice & \seqsplit{`forms.TypedChoiceField()`} \tn % Row Count 26 (+ 1) % Row 24 \SetRowColor{LightBackground} \seqsplit{ftmuchoice} & \seqsplit{`forms.TypedMultipleChoiceField()`} \tn % Row Count 28 (+ 2) % Row 25 \SetRowColor{white} furl & `forms.URLField()` \tn % Row Count 29 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2 cm} x{6 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Django Models}} \tn % Row 0 \SetRowColor{LightBackground} Model & `Simple Model Class` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \seqsplit{Model\_full} & `Full Model Class(with TODOs)` \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.888 cm} x{2.28 cm} x{2.432 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Completions}} \tn % Row 0 \SetRowColor{LightBackground} `null` & `blank` & `choices` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `db\_column` & `db\_index` & \seqsplit{`db\_tablespace`} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} `default` & \seqsplit{`related\_name`} & `editable` \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{`error\_message`} & \seqsplit{`help\_message`} & \seqsplit{`primary\_key`} \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} `unique` & \seqsplit{`unique\_together`} & \seqsplit{`unique\_for\_date`} \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{`unique\_for\_month`} & \seqsplit{`unique\_for\_year`} & \seqsplit{`verbose\_name`} \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{`verbose\_name\_plural`} & \seqsplit{`validators`} & \seqsplit{`auto\_now\_add`} \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} `auto\_now` & `required` & `label` \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} `initial` & `widget` & `localized` \tn % Row Count 15 (+ 1) % Row 9 \SetRowColor{white} `return` & \seqsplit{`RequestContext`} & \seqsplit{`context\_instance`} \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} \seqsplit{`render\_to\_response`} & `render` & `redirect` \tn % Row Count 19 (+ 2) % Row 11 \SetRowColor{white} \seqsplit{`get\_object\_or\_404`} & \seqsplit{`get\_list\_or\_404`} & \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.56 cm} x{5.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Django Views}} \tn % Row 0 \SetRowColor{LightBackground} view & `Function Based View` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} createview & `Generic Create View` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} updateview & `Generic Update View` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} deleteview & `Generic Delete View` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} detailview & `Generic Detail View` \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} listview & `Generic List View` \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \seqsplit{templateview} & `Generic Template View` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} adminview & `Generic Admin View` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} \seqsplit{tabularinline} & `Tabular Inline View` \tn % Row Count 10 (+ 2) % Row 9 \SetRowColor{white} \seqsplit{stackedinline} & `Stacked Inline View` \tn % Row Count 12 (+ 2) % Row 10 \SetRowColor{LightBackground} dispatch & `dispatch method for CBVs` \tn % Row Count 13 (+ 1) % Row 11 \SetRowColor{white} \seqsplit{get\_context\_data} & `get\_context\_data method for CBVs` \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.44 cm} x{6.56 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Snippets for Python}} \tn % Row 0 \SetRowColor{LightBackground} init & `\_\_init\_\_(self, {\emph{args, }}*kwargs)` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} pdb & `import pdb ; pdb.set\_trace()` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} ipdb & `import ipdb ; ipdb.set\_trace()` \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} npdb & `from nose.tools import set\_trace; set\_trace()` \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{traceback} & `import traceback; traceback.print\_exc();` \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} utfc & `coding: utf-8` \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}