├── 17 ├── Makefile ├── chapters │ ├── acknowledgements.rst │ ├── ajax.rst │ ├── bing_search.rst │ ├── bootstrap.rst │ ├── cookie.rst │ ├── css.rst.out │ ├── css_intro.rst │ ├── deploy.rst │ ├── forms.rst │ ├── game.rst.out │ ├── git.rst │ ├── javascript.rst │ ├── jquery.rst │ ├── login.rst │ ├── login_redux.rst │ ├── models.rst │ ├── models_templates.rst │ ├── new17.rst │ ├── outtakes.rst.out │ ├── overview.rst │ ├── requirements.rst │ ├── setup.rst │ ├── summary.rst │ ├── tango.rst │ ├── tango_too.rst │ ├── template_tags.rst │ ├── templates.rst │ ├── templates_static.rst │ ├── test.rst │ └── virtual.rst ├── conf.py ├── images │ ├── admin-populated.png │ ├── bbcnews-cookies.png │ ├── bing-explore.png │ ├── canvas.svg │ ├── ch1-rango-cat-page.png │ ├── ch1-rango-index.png │ ├── ch11-bootstrap-about.png │ ├── ch11-bootstrap-category-initial.png │ ├── ch11-bootstrap-index-initial.png │ ├── ch11-bootstrap-index-rows.png │ ├── ch11-bootstrap-login-custom.png │ ├── ch11-bootstrap-register-custom.png │ ├── ch11-bootstrap-register-initial.png │ ├── ch4-rango-about.png │ ├── ch4-rango-index.png │ ├── ch5-rango-admin-custom.png │ ├── ch5-rango-admin-models.png │ ├── ch5-rango-admin.png │ ├── ch6-rango-index-category-pages.png │ ├── ch6-rango-index-category.png │ ├── ch7-rango-category-add.png │ ├── ch7-rango-category.png │ ├── ch9-rango-add-category.png │ ├── ch9-rango-index.png │ ├── ch9-rango-python-page.png │ ├── cookie-visits.png │ ├── cover_image.pdf │ ├── css-basic.png │ ├── css-blocks-before.pdf │ ├── css-blocks.pdf │ ├── css-box-example.pdf │ ├── css-box-example2.pdf │ ├── css-box-model.pdf │ ├── css-box-model.svg │ ├── css-cascading.pdf │ ├── css-cascading.png │ ├── css-cascading.svg │ │ ├── Canvas_1.svg │ │ ├── image1.tiff │ │ ├── image2.tiff │ │ └── image3.tiff │ ├── css-class.pdf │ ├── css-class.png │ ├── css-colours.pdf │ ├── css-colours.svg │ ├── css-h1-highlighting.pdf │ ├── css-id.pdf │ ├── css-id.png │ ├── css-links-hover.pdf │ ├── css-lists-cats-end.png │ ├── css-lists-cats-float.pdf │ ├── css-lists-which.png │ ├── css-navbar-basic.png │ ├── css-nesting-blocks.pdf │ ├── css-nesting-blocks.svg │ ├── css-positioning-absolute1.pdf │ ├── css-positioning-absolute2.pdf │ ├── css-positioning-float1.pdf │ ├── css-positioning-float2.pdf │ ├── css-positioning-relative.pdf │ ├── css-render.pdf │ ├── css-render.png │ ├── css-tidied.png │ ├── deploy-pythonanywhere.png │ ├── django-dev-server-firstrun.png │ ├── git-sequence.pdf │ ├── git-sequence.svg │ ├── man.png │ ├── rango-admin.png │ ├── rango-categories-simple.png │ ├── rango-css-1.png │ ├── rango-css-2.png │ ├── rango-css-3.png │ ├── rango-css-4.png │ ├── rango-erd.png │ ├── rango-erd.svg │ ├── rango-erd.xml │ ├── rango-form-steps.pdf │ ├── rango-form-steps.png │ ├── rango-hello-world-template.png │ ├── rango-hello-world.png │ ├── rango-links.pdf │ ├── rango-links.png │ ├── rango-login-message.png │ ├── rango-ntier-architecture.png │ ├── rango-ntier-architecture.svg │ ├── rango-ntier-architecture.xml │ ├── rango-picture.pdf │ ├── rango-picture.png │ ├── rango-register-form.png │ ├── rango-site-with-pic.pdf │ ├── rango-site-with-pic.png │ ├── rango-template-inheritance.pdf │ ├── rango-template-inheritance.svg │ ├── relational-schema-basic-models.pdf │ ├── session-id.png │ ├── terminal_directory.png │ ├── test-cookie.png │ ├── twd.ico │ ├── twd200x200.jpg │ ├── url-chain.pdf │ ├── url-chain.svg │ ├── wireframe_cat.pdf │ └── wireframe_default.pdf ├── index.rst ├── new_images │ ├── ch_models_admin_interface.png │ ├── ch_models_template_categories.png │ └── ch_setup_it_worked.png ├── omnigraffle │ ├── css-blocks-before.graffle │ │ ├── data.plist │ │ └── image4.png │ ├── css-blocks.graffle │ ├── css-box-example.graffle │ ├── css-box-example2.graffle │ ├── css-box-model.graffle │ ├── css-cascading.graffle │ │ ├── data.plist │ │ ├── image1.tiff │ │ ├── image2.tiff │ │ └── image3.tiff │ ├── css-class.graffle │ ├── css-colours.graffle │ ├── css-h1-highlighting.graffle │ │ ├── data.plist │ │ └── image2.pdf │ ├── css-id.graffle │ ├── css-links-hover.graffle │ │ ├── data.plist │ │ ├── image1.png │ │ ├── image2.png │ │ └── image3.eps │ ├── css-lists-cats-float.graffle │ ├── css-nesting-blocks.graffle │ ├── css-positioning-absolute1.graffle │ ├── css-positioning-absolute2.graffle │ ├── css-positioning-float1.graffle │ ├── css-positioning-float2.graffle │ ├── css-positioning-relative.graffle │ ├── css-render.graffle │ ├── git-sequence.graffle │ ├── konigi_wireframe_stencils.gstencil │ │ ├── data.plist │ │ ├── image1.pdf │ │ ├── image10.pdf │ │ ├── image11.pdf │ │ ├── image12.pdf │ │ ├── image13.pdf │ │ ├── image14.pdf │ │ ├── image15.pdf │ │ ├── image16.pdf │ │ ├── image17.pdf │ │ ├── image18.pdf │ │ ├── image19.pdf │ │ ├── image2.pdf │ │ ├── image20.pdf │ │ ├── image21.pdf │ │ ├── image22.pdf │ │ ├── image23.pdf │ │ ├── image24.pdf │ │ ├── image25.pdf │ │ ├── image26.pdf │ │ ├── image3.pdf │ │ ├── image4.pdf │ │ ├── image5.pdf │ │ ├── image6.pdf │ │ ├── image7.pdf │ │ ├── image8.pdf │ │ └── image9.pdf │ ├── rango-form-steps.graffle │ │ ├── data.plist │ │ ├── image11.png │ │ └── image6.png │ ├── rango-links.graffle │ │ ├── data.plist │ │ ├── image1.png │ │ ├── image3.png │ │ └── image4.png │ ├── rango-picture.graffle │ │ ├── data.plist │ │ ├── image3.pdf │ │ └── image4.tiff │ ├── rango-site-with-pic.graffle │ │ ├── data.plist │ │ └── image1.png │ ├── rango-template-inheritance.graffle │ ├── relational-schema-basic-models.graffle │ ├── url-chain.graffle │ ├── wireframe-cat.graffle │ └── wireframe-default.graffle ├── sphinx-extensions │ ├── numfig.py │ └── numsec.py ├── tango_with_django_book.tmproj └── templates │ └── layout.html ├── 154 ├── Makefile ├── chapters │ ├── acknowledgements.rst │ ├── ajax.rst │ ├── bing_search.rst │ ├── bootstrap.rst │ ├── cookie.rst │ ├── css.rst.out │ ├── css_intro.rst │ ├── deploy.rst │ ├── forms.rst │ ├── game.rst.out │ ├── git.rst │ ├── javascript.rst │ ├── login.rst │ ├── models.rst │ ├── models_templates.rst │ ├── outtakes.rst.out │ ├── overview.rst │ ├── requirements.rst │ ├── setup.rst │ ├── summary.rst │ ├── tango.rst │ ├── tango_too.rst │ ├── templates.rst │ ├── templates_static.rst │ ├── test.rst │ └── virtual.rst ├── conf.py ├── images │ ├── admin-populated.png │ ├── bbcnews-cookies.png │ ├── bing-explore.png │ ├── canvas.svg │ ├── ch1-rango-cat-page.png │ ├── ch1-rango-index.png │ ├── ch11-bootstrap-about.png │ ├── ch11-bootstrap-category-initial.png │ ├── ch11-bootstrap-index-initial.png │ ├── ch11-bootstrap-index-rows.png │ ├── ch11-bootstrap-login-custom.png │ ├── ch11-bootstrap-register-custom.png │ ├── ch11-bootstrap-register-initial.png │ ├── ch4-rango-about.png │ ├── ch4-rango-index.png │ ├── ch5-rango-admin-custom.png │ ├── ch5-rango-admin-models.png │ ├── ch5-rango-admin.png │ ├── ch6-rango-index-category-pages.png │ ├── ch6-rango-index-category.png │ ├── ch7-rango-category-add.png │ ├── ch7-rango-category.png │ ├── ch9-rango-add-category.png │ ├── ch9-rango-index.png │ ├── ch9-rango-python-page.png │ ├── cookie-visits.png │ ├── cover_image.pdf │ ├── css-basic.png │ ├── css-blocks-before.pdf │ ├── css-blocks.pdf │ ├── css-box-example.pdf │ ├── css-box-example2.pdf │ ├── css-box-model.pdf │ ├── css-box-model.svg │ ├── css-cascading.pdf │ ├── css-cascading.png │ ├── css-cascading.svg │ │ ├── Canvas_1.svg │ │ ├── image1.tiff │ │ ├── image2.tiff │ │ └── image3.tiff │ ├── css-class.pdf │ ├── css-class.png │ ├── css-colours.pdf │ ├── css-colours.svg │ ├── css-h1-highlighting.pdf │ ├── css-id.pdf │ ├── css-id.png │ ├── css-links-hover.pdf │ ├── css-lists-cats-end.png │ ├── css-lists-cats-float.pdf │ ├── css-lists-which.png │ ├── css-navbar-basic.png │ ├── css-nesting-blocks.pdf │ ├── css-nesting-blocks.svg │ ├── css-positioning-absolute1.pdf │ ├── css-positioning-absolute2.pdf │ ├── css-positioning-float1.pdf │ ├── css-positioning-float2.pdf │ ├── css-positioning-relative.pdf │ ├── css-render.pdf │ ├── css-render.png │ ├── css-tidied.png │ ├── deploy-pythonanywhere.png │ ├── django-dev-server-firstrun.png │ ├── git-sequence.pdf │ ├── git-sequence.svg │ ├── man.png │ ├── rango-admin.png │ ├── rango-categories-simple.png │ ├── rango-css-1.png │ ├── rango-css-2.png │ ├── rango-css-3.png │ ├── rango-css-4.png │ ├── rango-erd.png │ ├── rango-erd.svg │ ├── rango-erd.xml │ ├── rango-form-steps.pdf │ ├── rango-form-steps.png │ ├── rango-hello-world-template.png │ ├── rango-hello-world.png │ ├── rango-links.pdf │ ├── rango-links.png │ ├── rango-login-message.png │ ├── rango-ntier-architecture.png │ ├── rango-ntier-architecture.svg │ ├── rango-ntier-architecture.xml │ ├── rango-picture.pdf │ ├── rango-picture.png │ ├── rango-register-form.png │ ├── rango-site-with-pic.pdf │ ├── rango-site-with-pic.png │ ├── rango-template-inheritance.pdf │ ├── rango-template-inheritance.svg │ ├── relational-schema-basic-models.pdf │ ├── session-id.png │ ├── terminal_directory.png │ ├── test-cookie.png │ ├── twd.ico │ ├── twd200x200.jpg │ ├── url-chain.pdf │ ├── url-chain.svg │ ├── wireframe_cat.pdf │ └── wireframe_default.pdf ├── index.rst ├── omnigraffle │ ├── css-blocks-before.graffle │ │ ├── data.plist │ │ └── image4.png │ ├── css-blocks.graffle │ ├── css-box-example.graffle │ ├── css-box-example2.graffle │ ├── css-box-model.graffle │ ├── css-cascading.graffle │ │ ├── data.plist │ │ ├── image1.tiff │ │ ├── image2.tiff │ │ └── image3.tiff │ ├── css-class.graffle │ ├── css-colours.graffle │ ├── css-h1-highlighting.graffle │ │ ├── data.plist │ │ └── image2.pdf │ ├── css-id.graffle │ ├── css-links-hover.graffle │ │ ├── data.plist │ │ ├── image1.png │ │ ├── image2.png │ │ └── image3.eps │ ├── css-lists-cats-float.graffle │ ├── css-nesting-blocks.graffle │ ├── css-positioning-absolute1.graffle │ ├── css-positioning-absolute2.graffle │ ├── css-positioning-float1.graffle │ ├── css-positioning-float2.graffle │ ├── css-positioning-relative.graffle │ ├── css-render.graffle │ ├── git-sequence.graffle │ ├── konigi_wireframe_stencils.gstencil │ │ ├── data.plist │ │ ├── image1.pdf │ │ ├── image10.pdf │ │ ├── image11.pdf │ │ ├── image12.pdf │ │ ├── image13.pdf │ │ ├── image14.pdf │ │ ├── image15.pdf │ │ ├── image16.pdf │ │ ├── image17.pdf │ │ ├── image18.pdf │ │ ├── image19.pdf │ │ ├── image2.pdf │ │ ├── image20.pdf │ │ ├── image21.pdf │ │ ├── image22.pdf │ │ ├── image23.pdf │ │ ├── image24.pdf │ │ ├── image25.pdf │ │ ├── image26.pdf │ │ ├── image3.pdf │ │ ├── image4.pdf │ │ ├── image5.pdf │ │ ├── image6.pdf │ │ ├── image7.pdf │ │ ├── image8.pdf │ │ └── image9.pdf │ ├── rango-form-steps.graffle │ │ ├── data.plist │ │ ├── image11.png │ │ └── image6.png │ ├── rango-links.graffle │ │ ├── data.plist │ │ ├── image1.png │ │ ├── image3.png │ │ └── image4.png │ ├── rango-picture.graffle │ │ ├── data.plist │ │ ├── image3.pdf │ │ └── image4.tiff │ ├── rango-site-with-pic.graffle │ │ ├── data.plist │ │ └── image1.png │ ├── rango-template-inheritance.graffle │ ├── relational-schema-basic-models.graffle │ ├── url-chain.graffle │ ├── wireframe-cat.graffle │ └── wireframe-default.graffle ├── sphinx-extensions │ ├── numfig.py │ └── numsec.py ├── tango_with_django_book.tmproj └── templates │ └── layout.html ├── .gitignore ├── README.md └── TODO.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.DS_Store 3 | _build/ 4 | book/_build/ 5 | *.log 6 | *.tmpproj 7 | *.db 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /154/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | # the i18n builder cannot share the environment and doctrees with the others 15 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 16 | 17 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 18 | 19 | help: 20 | @echo "Please use \`make ' where is one of" 21 | @echo " html to make standalone HTML files" 22 | @echo " dirhtml to make HTML files named index.html in directories" 23 | @echo " singlehtml to make a single large HTML file" 24 | @echo " pickle to make pickle files" 25 | @echo " json to make JSON files" 26 | @echo " htmlhelp to make HTML files and a HTML help project" 27 | @echo " qthelp to make HTML files and a qthelp project" 28 | @echo " devhelp to make HTML files and a Devhelp project" 29 | @echo " epub to make an epub" 30 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 31 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 32 | @echo " text to make text files" 33 | @echo " man to make manual pages" 34 | @echo " texinfo to make Texinfo files" 35 | @echo " info to make Texinfo files and run them through makeinfo" 36 | @echo " gettext to make PO message catalogs" 37 | @echo " changes to make an overview of all changed/added/deprecated items" 38 | @echo " linkcheck to check all external links for integrity" 39 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 40 | 41 | clean: 42 | -rm -rf $(BUILDDIR)/* 43 | 44 | html: 45 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 48 | 49 | dirhtml: 50 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 51 | @echo 52 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 53 | 54 | singlehtml: 55 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 56 | @echo 57 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 58 | 59 | pickle: 60 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 61 | @echo 62 | @echo "Build finished; now you can process the pickle files." 63 | 64 | json: 65 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 66 | @echo 67 | @echo "Build finished; now you can process the JSON files." 68 | 69 | htmlhelp: 70 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 71 | @echo 72 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 73 | ".hhp project file in $(BUILDDIR)/htmlhelp." 74 | 75 | qthelp: 76 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 77 | @echo 78 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 79 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 80 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/How_To_Tango_With_Django.qhcp" 81 | @echo "To view the help file:" 82 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/How_To_Tango_With_Django.qhc" 83 | 84 | devhelp: 85 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 86 | @echo 87 | @echo "Build finished." 88 | @echo "To view the help file:" 89 | @echo "# mkdir -p $$HOME/.local/share/devhelp/How_To_Tango_With_Django" 90 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/How_To_Tango_With_Django" 91 | @echo "# devhelp" 92 | 93 | epub: 94 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 95 | @echo 96 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 97 | 98 | latex: 99 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 100 | @echo 101 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 102 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 103 | "(use \`make latexpdf' here to do that automatically)." 104 | 105 | latexpdf: 106 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 107 | @echo "Running LaTeX files through pdflatex..." 108 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 109 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 110 | 111 | text: 112 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 113 | @echo 114 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 115 | 116 | man: 117 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 118 | @echo 119 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 120 | 121 | texinfo: 122 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 123 | @echo 124 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 125 | @echo "Run \`make' in that directory to run these through makeinfo" \ 126 | "(use \`make info' here to do that automatically)." 127 | 128 | info: 129 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 130 | @echo "Running Texinfo files through makeinfo..." 131 | make -C $(BUILDDIR)/texinfo info 132 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 133 | 134 | gettext: 135 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 136 | @echo 137 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 138 | 139 | changes: 140 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 141 | @echo 142 | @echo "The overview file is in $(BUILDDIR)/changes." 143 | 144 | linkcheck: 145 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 146 | @echo 147 | @echo "Link check complete; look for any errors in the above output " \ 148 | "or in $(BUILDDIR)/linkcheck/output.txt." 149 | 150 | doctest: 151 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 152 | @echo "Testing of doctests in the sources finished, look at the " \ 153 | "results in $(BUILDDIR)/doctest/output.txt." 154 | -------------------------------------------------------------------------------- /154/chapters/acknowledgements.rst: -------------------------------------------------------------------------------- 1 | Acknowledgements 2 | ================ 3 | 4 | The first version of this book began because my students were struggling to pick up the Django Framework as part of the course I teach on Web Application Development. However, it became painfully clear that the official Django Tutorials made many assumptions regarding one's background, missed out 5 | crucial steps here and there that would trip up the students, and finally, it was clear that the students lacked the vocabulary to google for the right things to resolve any problems that did arise (and also that they didn't have hours to spend trying to figure out what was going on). 6 | 7 | I realised that to go from woe to go required a lot of additional information and help to resolve common problems. For this I often consulted stackoverflow.com for advice, help and explanations, along with other sites - the folk who have contributed to these sites have been an invaluable source of knowledge which I have tried to distill and combine here. Thanks for your help it is very much appreciated. 8 | 9 | Leif 10 | 11 | 12 | In this book, we have pulled together the relevant information and details so that students and beginners to web development can go through the process in a seamless fashion and learn the basics of web application development. After realising the book we have had numerous people contact us with ways to improve the quality of the book. So we'd like to thank: 13 | 14 | * Manoel Maria ‏@xmadruga157 15 | * Codenius @Codenius 16 | * Ally Weir 17 | * Can Ibanoglu @canlbanoglu 18 | * Sadegh Kh ‏@IR_Melbourne 19 | * Jan Felix Trettow ‏@JanFelixTrettow 20 | * Rezha Julio ‏@kimiamania 21 | * Thomas Murphy ‏@TMurphyMusic 22 | * Saurabh Tandon ‏@saurabhtand 23 | * Pierre-Yves Mathieu https://github.com/pywebdesign 24 | * Dhiraj Thakur https://github.com/dhirajt 25 | * Svante Kvarnström @sjktje 26 | * Ramdog https://github.com/ramdog 27 | * Krace Kumar https://github.com/kracekumar 28 | * James Yeo 29 | * Michael Ho Chum https://github.com/michaelchum 30 | * Jonathan Sundqvist https://github.com/jonathan-s 31 | * nolan-m https://github.com/nolan-m 32 | * Kartik Singhal https://github.com/k4rtik 33 | * William Vincent 34 | * Mike Gleen 35 | * Oleg Belausov 36 | * Adam Kikowski 37 | * Thomas Whyyou @thomaswhyyou 38 | * Dan C 39 | * Saex https://github.com/SaeX 40 | * Breakerfall https://github.com/breakerfall 41 | * Michael Herman https://github.com/mjhea0 42 | * Praestgias https://github.com/praestigias 43 | * Claus Conrad https://github.com/cconrad 44 | * nCrazed https://github.com/nCrazed 45 | * rnevius https://github.com/rnevius 46 | 47 | for their suggestions, comments and feedback, which have greatly improved the quality of this resource. 48 | 49 | 50 | Leif and David 51 | 52 | -------------------------------------------------------------------------------- /154/chapters/game.rst.out: -------------------------------------------------------------------------------- 1 | Sessions and Cookies: A Search Game 2 | =================================== 3 | 4 | * This part of the tutorial focus on Working with sessions and cookies. 5 | * The aim is to add a game to the application which is like PageHunt/Fu-Finder/PageFetch 6 | * In the game, a player will be able to choose a category 7 | * Then they will be shown a random page from the category, using search functionality they will need to enter a query to find the page. 8 | * They have up to 5 attempts to find the page, and they are shown 5 random pages. 9 | 10 | 11 | Setting up the game 12 | ------------------- 13 | 14 | Creating a Game Model 15 | ..................... 16 | 17 | 18 | Creating a Game View/Template 19 | ............................. 20 | 21 | * Select Category 22 | * Select/Define number of pages (i.e. game length) 23 | * Set Cookie with GameID 24 | 25 | * Add a record into the Game Model (this player is play a game in a certain category) 26 | * Initial the game values 27 | 28 | Creating a Game Play View/Template 29 | .................................. 30 | 31 | * Get Game object for the player (using GameID from cookie) 32 | 33 | 34 | 35 | Creating an End Game View/Template 36 | .................................. 37 | 38 | 39 | Lab Exercises 40 | ------------- 41 | * Add a Leaderboard View/Template 42 | * Create a game that is time based (i.e. times out after 3 minutes) 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /154/chapters/javascript.rst: -------------------------------------------------------------------------------- 1 | Javascript and JQuery 2 | --------------------- 3 | In the next edition we'll be adding in tutorials on how to use Javascript and JQuery within Web Application. -------------------------------------------------------------------------------- /154/chapters/summary.rst: -------------------------------------------------------------------------------- 1 | Summary 2 | ======= 3 | 4 | In this book, we have gone through the process of web development from specification to deployment. Along the way we have shown how to use the Django framework to construct the models, views and templates associated with a web application. We have also demonstrated how toolkits and services like Bootstrap, JQuery, Bing Search, PythonAnywhere, etc can be integrated within an application. However, the road doesn't stop here. While, as we have only painted the broad brush strokes of a web application - as you have probably noticed there are lots of improvements that could be made to Rango - and these finer details often take a lot more time to complete as you polish the application. By developing your application on a firm base and good setup you will be able to construct up to 80% of your site very rapidly and get a working version up to demo fast. 5 | 6 | In future versions of this book we intend to provide some more details on various aspects of the framework, along with covering the basics of some of the other fundamental technologies associated with web development. If you have any suggestions or comments about how to improve the book please get in touch. -------------------------------------------------------------------------------- /154/chapters/tango.rst: -------------------------------------------------------------------------------- 1 | .. _tango-label: 2 | 3 | Making Rango Tango! Exercises 4 | ============================= 5 | 6 | So far we have been adding in different pieces of functionality to Rango. We've been building up the application in this manner to get you familiar with the Django Framework, and to learn about how to construct the various parts of a website that you are likely to make in your own projects. Rango however at the present moment is not very cohesive. In this chapter, we challenge you to improve the application and its user experience by bringing together functionality that we've already implemented alongside some awesome new additions. 7 | 8 | To make Rango more coherent and integrated it would be nice to add the following functionality. 9 | 10 | * Integrate the browsing and searching within categories, i.e.: 11 | * provide categories on every page; 12 | * provide some way to search through categories (see Chapter :ref:`ajax-label`); and 13 | * instead of have a disconnected search page, let users search for pages within a category so that they can then add these pages to the category (see Chapter :ref:`ajax-label`) 14 | 15 | * Provide services for Registered Users, i.e.: 16 | * let users view their profile; 17 | * let users edit their profile; and 18 | * let users see the list of users and their profiles. 19 | 20 | * Track the click throughs of Categories and Pages, i.e.: 21 | * count the number of times a category is viewed; 22 | * count the number of times a page is viewed via Rango; and 23 | * collect likes for categories (see Chapter :ref:`ajax-label`). 24 | 25 | .. note:: We won't be working through all of these tasks right now. Some will be taken care of in Chapter :ref:`ajax-label`, while some will be left to you to complete as additional exercises. 26 | 27 | Before we start to add this additional functionality we will make a todo list to plan our workflow for each task. Breaking tasks down into sub-tasks will greatly simplify the implementation and mean that we are attacking each one with a clear plan. In this chapter, we will provide you with the workflow for a number of the above tasks. From what you have learnt so far, you should be able to fill in the gaps and implement most of it on your own. The following chapter however includes the code walkthrough, along with notes on how we have implemented each task. 28 | 29 | 30 | Providing Categories on Every Page 31 | ---------------------------------- 32 | 33 | It would be nice to show the different categories that users can browse through on any page, and not just the index page. There are a number of ways that this can be achieved, but given what we have learnt so far, we could undertake the following workflow: 34 | 35 | * Create a ``category_list.html`` template and migrate the template code for presenting the categories list from ``index.html`` to this new template. This template won't be a full HTML document, but a portion of one which we can include in other templates. 36 | * Use the ``{% include "rango/category_list.html" %}`` to now include this template code into the ``base.html`` template within the sidebar. This means that all pages will now include categories, assuming the ``cat_list`` data is passed through in the context dictionary. 37 | * To handle the scenario where ``cat_list`` isn't available, add the conditional ``{% if cat_list %}`` to ensure that only templates providing ``cat_list`` attempt to render this component. 38 | * Migrate the code that gathers the list of categories from the ``index()`` view and place it into your ``category()`` view. While it's really tempting to simply copy and paste, there's a much better way to go about this! 39 | * Create a helper function called ``get_category_list()`` within ``views.py`` that returns the list of categories. 40 | * We can then call this function whenever we want to get the category list to be presented in the sidebar. This saves a lot of code repetition! 41 | * Pass the category list data (``cat_list``) through to the template to complete the process. 42 | 43 | Searching Within a Category Page 44 | -------------------------------- 45 | Rango aims to provide users with a helpful directory of page links. At the moment, the search functionality is essentially independent of the categories. It would be nicer however to have search integrated into category browsing. Let's assume that a user will first browse their category of interest first. If they can't find the page that they want, they can then search for it. If they find a page that is suitable, then they can add it to the category that they are in. Let's tackle the first part of this description here. 46 | 47 | We first need to remove the global search functionality and only let users search within a category. This will mean that we essentially decommission the current search page and search view. After this, we'll need to perform the following steps. 48 | 49 | * Remove the generic *Search* link from the menu bar. 50 | * Take the search form and results template markup from ``search.html`` and place it into ``category.html``. 51 | * Update the category view to handle a HTTP ``POST`` request. The view must then include any search results in the context dictionary for the template to render. 52 | 53 | View Profile 54 | ------------ 55 | Another useful feature to add is a profile page, where users can view details of their Rango profile. Undertake the following steps to add this functionality. 56 | 57 | * First, create a template called ``profile.html``. In this template, add in the fields associated with the user profile and the user (i.e. username, email, website and picture). 58 | * Create a view called ``profile()``. This view will obtain the data required to render the user profile template. 59 | * Map the URL ``/rango/profile/`` to your new ``profile()`` view. 60 | * In the base template add a link called *Profile* into the menu bar, preferably on the right-hand side with other user-related links. This should only be available to users who are logged in (i.e. ``{% if user.is_authenticated %}``). 61 | 62 | Track Page Click Throughs 63 | ------------------------- 64 | Currently, Rango provides a direct link to external pages. This is not very good if you want to track the number of times each page is clicked and viewed. To count the number of times a page is viewed via Rango you will need to perform the following steps. 65 | 66 | * Create a new view called ``track_url()``, and map it to URL ``/rango/goto/``. 67 | * The ``track_url()`` view will examine the HTTP ``GET`` request parameters and pull out the ``page_id``. The HTTP ``GET`` requests will look something like ``/rango/goto/?page_id=1``. 68 | * Your view should then be able to find the relevant ``Page`` model for the selected page, and add 1 to the associated ``views`` field. 69 | * The view will then redirect the user to the specified URL using Django's ``redirect`` method. 70 | * In the scenario where no parameters are in the HTTP ``GET`` request for ``page_id``, or the parameters do not return a ``Page`` object, redirect the user to Rango's homepage. 71 | * Update the ``category.html`` so that it uses ``/rango/goto/?page_id=XXX`` instead of using the direct URL. 72 | 73 | Hint 74 | .... 75 | If you're unsure of how to retrieve the ``page_id`` *querystring* from the HTTP ``GET`` request, the following code sample should help you. 76 | 77 | .. code-block:: python 78 | 79 | if request.method == 'GET': 80 | if 'page_id' in request.GET: 81 | page_id = request.GET['page_id'] 82 | 83 | Always check the request method is of type ``GET`` first, then you can access the dictionary ``request.GET`` which contains values passed as part of the request. If ``page_id`` exists within the dictionary, you can pull the required value out with ``request.GET['page_id']``. -------------------------------------------------------------------------------- /154/chapters/test.rst: -------------------------------------------------------------------------------- 1 | Test Driven Development 2 | ======================= 3 | 4 | In the next edition, we'll be adding in a chapter about Test Driven Development - in the meantime we highly recommend checking out the `tutorial on test driven development by Harry Percival `_. 5 | 6 | Exercises 7 | --------- 8 | 9 | * Undertake `Part Five of the official Django Tutorial `_ to learn about automated testing. 10 | 11 | -------------------------------------------------------------------------------- /154/chapters/virtual.rst: -------------------------------------------------------------------------------- 1 | Virtual Environments 2 | ==================== 3 | 4 | To create a virtual enironment use: 5 | 6 | mkvirtualenv 7 | 8 | 9 | 10 | 11 | 12 | To list what virtual environments use: 13 | 14 | lsvirtualenv 15 | 16 | -b provides a brief listing. 17 | -------------------------------------------------------------------------------- /154/images/admin-populated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/admin-populated.png -------------------------------------------------------------------------------- /154/images/bbcnews-cookies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/bbcnews-cookies.png -------------------------------------------------------------------------------- /154/images/bing-explore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/bing-explore.png -------------------------------------------------------------------------------- /154/images/canvas.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-07-26 20:44ZCanvas 1Layer 1Rango image hosted on flickr under Creative Commons licence - user elbragon 4 | -------------------------------------------------------------------------------- /154/images/ch1-rango-cat-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch1-rango-cat-page.png -------------------------------------------------------------------------------- /154/images/ch1-rango-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch1-rango-index.png -------------------------------------------------------------------------------- /154/images/ch11-bootstrap-about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch11-bootstrap-about.png -------------------------------------------------------------------------------- /154/images/ch11-bootstrap-category-initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch11-bootstrap-category-initial.png -------------------------------------------------------------------------------- /154/images/ch11-bootstrap-index-initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch11-bootstrap-index-initial.png -------------------------------------------------------------------------------- /154/images/ch11-bootstrap-index-rows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch11-bootstrap-index-rows.png -------------------------------------------------------------------------------- /154/images/ch11-bootstrap-login-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch11-bootstrap-login-custom.png -------------------------------------------------------------------------------- /154/images/ch11-bootstrap-register-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch11-bootstrap-register-custom.png -------------------------------------------------------------------------------- /154/images/ch11-bootstrap-register-initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch11-bootstrap-register-initial.png -------------------------------------------------------------------------------- /154/images/ch4-rango-about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch4-rango-about.png -------------------------------------------------------------------------------- /154/images/ch4-rango-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch4-rango-index.png -------------------------------------------------------------------------------- /154/images/ch5-rango-admin-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch5-rango-admin-custom.png -------------------------------------------------------------------------------- /154/images/ch5-rango-admin-models.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch5-rango-admin-models.png -------------------------------------------------------------------------------- /154/images/ch5-rango-admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch5-rango-admin.png -------------------------------------------------------------------------------- /154/images/ch6-rango-index-category-pages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch6-rango-index-category-pages.png -------------------------------------------------------------------------------- /154/images/ch6-rango-index-category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch6-rango-index-category.png -------------------------------------------------------------------------------- /154/images/ch7-rango-category-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch7-rango-category-add.png -------------------------------------------------------------------------------- /154/images/ch7-rango-category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch7-rango-category.png -------------------------------------------------------------------------------- /154/images/ch9-rango-add-category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch9-rango-add-category.png -------------------------------------------------------------------------------- /154/images/ch9-rango-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch9-rango-index.png -------------------------------------------------------------------------------- /154/images/ch9-rango-python-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/ch9-rango-python-page.png -------------------------------------------------------------------------------- /154/images/cookie-visits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/cookie-visits.png -------------------------------------------------------------------------------- /154/images/cover_image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/cover_image.pdf -------------------------------------------------------------------------------- /154/images/css-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-basic.png -------------------------------------------------------------------------------- /154/images/css-blocks-before.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-blocks-before.pdf -------------------------------------------------------------------------------- /154/images/css-blocks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-blocks.pdf -------------------------------------------------------------------------------- /154/images/css-box-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-box-example.pdf -------------------------------------------------------------------------------- /154/images/css-box-example2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-box-example2.pdf -------------------------------------------------------------------------------- /154/images/css-box-model.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-box-model.pdf -------------------------------------------------------------------------------- /154/images/css-box-model.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-09-15 15:32ZCanvas 1Layer 1Content of ElementKey:ContentPaddingBorderMargin 4 | -------------------------------------------------------------------------------- /154/images/css-cascading.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-cascading.pdf -------------------------------------------------------------------------------- /154/images/css-cascading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-cascading.png -------------------------------------------------------------------------------- /154/images/css-cascading.svg/image1.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-cascading.svg/image1.tiff -------------------------------------------------------------------------------- /154/images/css-cascading.svg/image2.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-cascading.svg/image2.tiff -------------------------------------------------------------------------------- /154/images/css-cascading.svg/image3.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-cascading.svg/image3.tiff -------------------------------------------------------------------------------- /154/images/css-class.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-class.pdf -------------------------------------------------------------------------------- /154/images/css-class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-class.png -------------------------------------------------------------------------------- /154/images/css-colours.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-colours.pdf -------------------------------------------------------------------------------- /154/images/css-h1-highlighting.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-h1-highlighting.pdf -------------------------------------------------------------------------------- /154/images/css-id.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-id.pdf -------------------------------------------------------------------------------- /154/images/css-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-id.png -------------------------------------------------------------------------------- /154/images/css-links-hover.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-links-hover.pdf -------------------------------------------------------------------------------- /154/images/css-lists-cats-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-lists-cats-end.png -------------------------------------------------------------------------------- /154/images/css-lists-cats-float.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-lists-cats-float.pdf -------------------------------------------------------------------------------- /154/images/css-lists-which.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-lists-which.png -------------------------------------------------------------------------------- /154/images/css-navbar-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-navbar-basic.png -------------------------------------------------------------------------------- /154/images/css-nesting-blocks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-nesting-blocks.pdf -------------------------------------------------------------------------------- /154/images/css-positioning-absolute1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-positioning-absolute1.pdf -------------------------------------------------------------------------------- /154/images/css-positioning-absolute2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-positioning-absolute2.pdf -------------------------------------------------------------------------------- /154/images/css-positioning-float1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-positioning-float1.pdf -------------------------------------------------------------------------------- /154/images/css-positioning-float2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-positioning-float2.pdf -------------------------------------------------------------------------------- /154/images/css-positioning-relative.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-positioning-relative.pdf -------------------------------------------------------------------------------- /154/images/css-render.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-render.pdf -------------------------------------------------------------------------------- /154/images/css-render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-render.png -------------------------------------------------------------------------------- /154/images/css-tidied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/css-tidied.png -------------------------------------------------------------------------------- /154/images/deploy-pythonanywhere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/deploy-pythonanywhere.png -------------------------------------------------------------------------------- /154/images/django-dev-server-firstrun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/django-dev-server-firstrun.png -------------------------------------------------------------------------------- /154/images/git-sequence.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/git-sequence.pdf -------------------------------------------------------------------------------- /154/images/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/man.png -------------------------------------------------------------------------------- /154/images/rango-admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-admin.png -------------------------------------------------------------------------------- /154/images/rango-categories-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-categories-simple.png -------------------------------------------------------------------------------- /154/images/rango-css-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-css-1.png -------------------------------------------------------------------------------- /154/images/rango-css-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-css-2.png -------------------------------------------------------------------------------- /154/images/rango-css-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-css-3.png -------------------------------------------------------------------------------- /154/images/rango-css-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-css-4.png -------------------------------------------------------------------------------- /154/images/rango-erd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-erd.png -------------------------------------------------------------------------------- /154/images/rango-erd.svg: -------------------------------------------------------------------------------- 1 | CategoryPage
houses
[Object]
-------------------------------------------------------------------------------- /154/images/rango-erd.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /154/images/rango-form-steps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-form-steps.pdf -------------------------------------------------------------------------------- /154/images/rango-form-steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-form-steps.png -------------------------------------------------------------------------------- /154/images/rango-hello-world-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-hello-world-template.png -------------------------------------------------------------------------------- /154/images/rango-hello-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-hello-world.png -------------------------------------------------------------------------------- /154/images/rango-links.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-links.pdf -------------------------------------------------------------------------------- /154/images/rango-links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-links.png -------------------------------------------------------------------------------- /154/images/rango-login-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-login-message.png -------------------------------------------------------------------------------- /154/images/rango-ntier-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-ntier-architecture.png -------------------------------------------------------------------------------- /154/images/rango-ntier-architecture.svg: -------------------------------------------------------------------------------- 1 |

Search API
[Object]
Database
[Object]
Middleware
[Object]
Client
[Object]
-------------------------------------------------------------------------------- /154/images/rango-ntier-architecture.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /154/images/rango-picture.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-picture.pdf -------------------------------------------------------------------------------- /154/images/rango-picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-picture.png -------------------------------------------------------------------------------- /154/images/rango-register-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-register-form.png -------------------------------------------------------------------------------- /154/images/rango-site-with-pic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-site-with-pic.pdf -------------------------------------------------------------------------------- /154/images/rango-site-with-pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-site-with-pic.png -------------------------------------------------------------------------------- /154/images/rango-template-inheritance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/rango-template-inheritance.pdf -------------------------------------------------------------------------------- /154/images/rango-template-inheritance.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-09-28 16:17ZCanvas 1Layer 1base.htmlindex.htmllogin.htmlregister.htmlrestricted.htmlabout.htmlcategory.htmladd_category.htmladd_page.html 4 | -------------------------------------------------------------------------------- /154/images/relational-schema-basic-models.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/relational-schema-basic-models.pdf -------------------------------------------------------------------------------- /154/images/session-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/session-id.png -------------------------------------------------------------------------------- /154/images/terminal_directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/terminal_directory.png -------------------------------------------------------------------------------- /154/images/test-cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/test-cookie.png -------------------------------------------------------------------------------- /154/images/twd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/twd.ico -------------------------------------------------------------------------------- /154/images/twd200x200.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/twd200x200.jpg -------------------------------------------------------------------------------- /154/images/url-chain.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/url-chain.pdf -------------------------------------------------------------------------------- /154/images/url-chain.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-10-02 13:26ZCanvas 1Layer 1http://www.servername.com/rango/indexDomain nameProject configuration urls.pyRango urls.py 4 | -------------------------------------------------------------------------------- /154/images/wireframe_cat.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/wireframe_cat.pdf -------------------------------------------------------------------------------- /154/images/wireframe_default.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/images/wireframe_default.pdf -------------------------------------------------------------------------------- /154/index.rst: -------------------------------------------------------------------------------- 1 | .. How_To_Tango_With_Django documentation master file, created by 2 | sphinx-quickstart on Thu Dec 20 15:10:50 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | How To Tango With Django 1.5.4 7 | ==================================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 3 11 | :numbered: 12 | 13 | chapters/overview 14 | chapters/requirements 15 | chapters/setup 16 | chapters/templates_static 17 | chapters/models 18 | chapters/models_templates 19 | chapters/forms 20 | chapters/login 21 | chapters/templates 22 | chapters/cookie 23 | chapters/bootstrap 24 | chapters/bing_search 25 | chapters/tango 26 | chapters/tango_too 27 | chapters/ajax 28 | chapters/deploy 29 | chapters/summary 30 | chapters/git 31 | chapters/css_intro 32 | chapters/javascript 33 | chapters/test 34 | chapters/acknowledgements 35 | 36 | 37 | Indices and tables 38 | ================== 39 | 40 | * :ref:`genindex` 41 | * :ref:`modindex` 42 | * :ref:`search` 43 | 44 | -------------------------------------------------------------------------------- /154/omnigraffle/css-blocks-before.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-blocks-before.graffle/image4.png -------------------------------------------------------------------------------- /154/omnigraffle/css-cascading.graffle/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-cascading.graffle/data.plist -------------------------------------------------------------------------------- /154/omnigraffle/css-cascading.graffle/image1.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-cascading.graffle/image1.tiff -------------------------------------------------------------------------------- /154/omnigraffle/css-cascading.graffle/image2.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-cascading.graffle/image2.tiff -------------------------------------------------------------------------------- /154/omnigraffle/css-cascading.graffle/image3.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-cascading.graffle/image3.tiff -------------------------------------------------------------------------------- /154/omnigraffle/css-h1-highlighting.graffle/image2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-h1-highlighting.graffle/image2.pdf -------------------------------------------------------------------------------- /154/omnigraffle/css-links-hover.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-links-hover.graffle/image1.png -------------------------------------------------------------------------------- /154/omnigraffle/css-links-hover.graffle/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-links-hover.graffle/image2.png -------------------------------------------------------------------------------- /154/omnigraffle/css-links-hover.graffle/image3.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/css-links-hover.graffle/image3.eps -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/data.plist -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image1.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image10.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image11.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image12.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image12.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image13.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image13.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image14.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image14.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image15.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image15.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image16.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image16.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image17.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image17.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image18.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image18.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image19.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image19.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image2.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image20.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image20.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image21.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image21.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image22.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image23.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image23.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image24.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image24.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image25.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image25.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image26.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image26.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image3.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image4.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image5.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image6.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image7.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image8.pdf -------------------------------------------------------------------------------- /154/omnigraffle/konigi_wireframe_stencils.gstencil/image9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/konigi_wireframe_stencils.gstencil/image9.pdf -------------------------------------------------------------------------------- /154/omnigraffle/rango-form-steps.graffle/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-form-steps.graffle/image11.png -------------------------------------------------------------------------------- /154/omnigraffle/rango-form-steps.graffle/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-form-steps.graffle/image6.png -------------------------------------------------------------------------------- /154/omnigraffle/rango-links.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-links.graffle/image1.png -------------------------------------------------------------------------------- /154/omnigraffle/rango-links.graffle/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-links.graffle/image3.png -------------------------------------------------------------------------------- /154/omnigraffle/rango-links.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-links.graffle/image4.png -------------------------------------------------------------------------------- /154/omnigraffle/rango-picture.graffle/image3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-picture.graffle/image3.pdf -------------------------------------------------------------------------------- /154/omnigraffle/rango-picture.graffle/image4.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-picture.graffle/image4.tiff -------------------------------------------------------------------------------- /154/omnigraffle/rango-site-with-pic.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/154/omnigraffle/rango-site-with-pic.graffle/image1.png -------------------------------------------------------------------------------- /154/sphinx-extensions/numfig.py: -------------------------------------------------------------------------------- 1 | from docutils.nodes import figure, caption, Text, reference, raw, SkipNode, Element 2 | from sphinx.roles import XRefRole 3 | 4 | # 5 | # numfig Sphinx extension 6 | # Check out https://bitbucket.org/arjones6/sphinx-numfig/wiki/Home for the documentation (as of 2013-07-16) 7 | # Comment added by dmax 8 | # 9 | 10 | # Element classes 11 | 12 | class page_ref(reference): 13 | pass 14 | 15 | class num_ref(reference): 16 | pass 17 | 18 | def skip_num_ref(self, node): 19 | raise SkipNode 20 | 21 | # Visit/depart functions 22 | 23 | def skip_page_ref(self, node): 24 | raise SkipNode 25 | 26 | def latex_visit_page_ref(self, node): 27 | self.body.append("\\pageref{%s:%s}" % (node['refdoc'], node['reftarget'])) 28 | raise SkipNode 29 | 30 | def latex_visit_num_ref(self, node): 31 | fields = node['reftarget'].split('#') 32 | if len(fields) > 1: 33 | label, target = fields 34 | ref_link = '%s:%s' % (node['refdoc'], target) 35 | latex = "\\hyperref[%s]{%s \\ref*{%s}}" % (ref_link, label, ref_link) 36 | self.body.append(latex) 37 | else: 38 | self.body.append('\\ref{%s:%s}' % (node['refdoc'], fields[0])) 39 | 40 | raise SkipNode 41 | 42 | 43 | def doctree_read(app, doctree): 44 | # first generate figure numbers for each figure 45 | env = app.builder.env 46 | figid_docname_map = getattr(env, 'figid_docname_map', {}) 47 | 48 | for figure_info in doctree.traverse(figure): 49 | for id in figure_info['ids']: 50 | figid_docname_map[id] = env.docname 51 | 52 | env.figid_docname_map = figid_docname_map 53 | 54 | 55 | def doctree_resolved(app, doctree, docname): 56 | i = 1 57 | figids = {} 58 | for figure_info in doctree.traverse(figure): 59 | if app.builder.name != 'latex' and app.config.number_figures: 60 | for cap in figure_info.traverse(caption): 61 | cap[0] = Text("%s %d: %s" % (app.config.figure_caption_prefix, i, cap[0])) 62 | 63 | for id in figure_info['ids']: 64 | figids[id] = i 65 | 66 | i += 1 67 | 68 | 69 | # replace numfig nodes with links 70 | if app.builder.name != 'latex': 71 | for ref_info in doctree.traverse(num_ref): 72 | if '#' in ref_info['reftarget']: 73 | label, target = ref_info['reftarget'].split('#') 74 | labelfmt = label + " %d" 75 | else: 76 | labelfmt = '%d' 77 | target = ref_info['reftarget'] 78 | 79 | if target not in figids: 80 | continue 81 | 82 | if app.builder.name == 'html': 83 | target_doc = app.builder.env.figid_docname_map[target] 84 | link = "%s#%s" % (app.builder.get_relative_uri(docname, target_doc), 85 | target) 86 | html = '%s' % (link, labelfmt %(figids[target])) 87 | ref_info.replace_self(raw(html, html, format='html')) 88 | else: 89 | ref_info.replace_self(Text(labelfmt % (figids[target]))) 90 | 91 | 92 | def clean_env(app): 93 | app.builder.env.i=1 94 | app.builder.env.figid_docname_map = {} 95 | 96 | def setup(app): 97 | app.add_config_value('number_figures', True, True) 98 | app.add_config_value('figure_caption_prefix', "Figure", True) 99 | 100 | app.add_node(page_ref, 101 | text=(skip_page_ref, None), 102 | html=(skip_page_ref, None), 103 | latex=(latex_visit_page_ref, None)) 104 | 105 | app.add_role('page', XRefRole(nodeclass=page_ref)) 106 | 107 | app.add_node(num_ref, 108 | html=(skip_num_ref, None), 109 | latex=(latex_visit_num_ref, None)) 110 | 111 | app.add_role('num', XRefRole(nodeclass=num_ref)) 112 | 113 | app.connect("builder-inited", clean_env) 114 | app.connect('doctree-read', doctree_read) 115 | app.connect('doctree-resolved', doctree_resolved) 116 | -------------------------------------------------------------------------------- /154/sphinx-extensions/numsec.py: -------------------------------------------------------------------------------- 1 | """ 2 | Changes section references to be the section number 3 | instead of the title of the section. 4 | """ 5 | 6 | from docutils import nodes 7 | import sphinx.domains.std 8 | 9 | class CustomStandardDomain(sphinx.domains.std.StandardDomain): 10 | 11 | def __init__(self, env): 12 | env.settings['footnote_references'] = 'superscript' 13 | sphinx.domains.std.StandardDomain.__init__(self, env) 14 | 15 | def resolve_xref(self, env, fromdocname, builder, 16 | typ, target, node, contnode): 17 | res = super(CustomStandardDomain, self).resolve_xref(env, fromdocname, builder, 18 | typ, target, node, contnode) 19 | 20 | if res is None: 21 | return res 22 | 23 | if typ == 'ref' and not node['refexplicit']: 24 | docname, labelid, sectname = self.data['labels'].get(target, ('','','')) 25 | res['refdocname'] = docname 26 | 27 | return res 28 | 29 | def doctree_resolved(app, doctree, docname): 30 | secnums = app.builder.env.toc_secnumbers 31 | for node in doctree.traverse(nodes.reference): 32 | if 'refdocname' in node: 33 | refdocname = node['refdocname'] 34 | if refdocname in secnums: 35 | secnum = secnums[refdocname] 36 | emphnode = node.children[0] 37 | textnode = emphnode.children[0] 38 | 39 | toclist = app.builder.env.tocs[refdocname] 40 | anchorname = None 41 | for refnode in toclist.traverse(nodes.reference): 42 | if refnode.astext() == textnode.astext(): 43 | anchorname = refnode['anchorname'] 44 | if anchorname is None: 45 | continue 46 | linktext = '.'.join(map(str, secnum[anchorname])) 47 | node.replace(emphnode, nodes.Text(linktext)) 48 | 49 | def setup(app): 50 | app.override_domain(CustomStandardDomain) 51 | app.connect('doctree-resolved', doctree_resolved) -------------------------------------------------------------------------------- /154/tango_with_django_book.tmproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | documents 6 | 7 | 8 | filename 9 | index.rst 10 | 11 | 12 | filename 13 | conf.py 14 | lastUsed 15 | 2013-10-20T17:11:32Z 16 | 17 | 18 | filename 19 | chapters/ajax.rst 20 | 21 | 22 | filename 23 | chapters/bing_search.rst 24 | 25 | 26 | filename 27 | chapters/bootstrap.rst 28 | 29 | 30 | filename 31 | chapters/cookie.rst 32 | lastUsed 33 | 2013-10-17T16:07:45Z 34 | 35 | 36 | filename 37 | chapters/css_intro.rst 38 | 39 | 40 | filename 41 | chapters/css.rst.out 42 | 43 | 44 | filename 45 | chapters/deploy.rst 46 | 47 | 48 | filename 49 | chapters/forms.rst 50 | lastUsed 51 | 2013-10-22T16:14:30Z 52 | 53 | 54 | filename 55 | chapters/game.rst.out 56 | 57 | 58 | filename 59 | chapters/git.rst 60 | 61 | 62 | filename 63 | chapters/javascript.rst 64 | 65 | 66 | filename 67 | chapters/login.rst 68 | lastUsed 69 | 2013-10-22T15:00:23Z 70 | 71 | 72 | filename 73 | chapters/models_templates.rst 74 | lastUsed 75 | 2013-10-22T14:26:12Z 76 | 77 | 78 | filename 79 | chapters/models.rst 80 | lastUsed 81 | 2013-10-17T16:58:33Z 82 | 83 | 84 | filename 85 | chapters/outtakes.rst.out 86 | 87 | 88 | filename 89 | chapters/overview.rst 90 | 91 | 92 | filename 93 | chapters/requirements.rst 94 | lastUsed 95 | 2013-10-24T13:28:40Z 96 | selected 97 | 98 | 99 | 100 | filename 101 | chapters/setup.rst 102 | 103 | 104 | filename 105 | chapters/summary.rst 106 | 107 | 108 | filename 109 | chapters/tango_too.rst 110 | 111 | 112 | filename 113 | chapters/tango.rst 114 | 115 | 116 | filename 117 | chapters/templates_static.rst 118 | 119 | 120 | filename 121 | chapters/templates.rst 122 | 123 | 124 | filename 125 | chapters/test.rst 126 | 127 | 128 | filename 129 | TODO.md 130 | lastUsed 131 | 2013-10-17T16:58:33Z 132 | 133 | 134 | fileHierarchyDrawerWidth 135 | 200 136 | metaData 137 | 138 | showFileHierarchyDrawer 139 | 140 | windowFrame 141 | {{217, 0}, {1063, 778}} 142 | 143 | 144 | -------------------------------------------------------------------------------- /154/templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {%- block extrahead %} 4 | 19 | 31 | {% endblock %} 32 | 33 | {%- macro relbar_custom() %} 34 | 55 | 56 | 57 | 58 | {%- endmacro %} 59 | 60 | {% block relbar1 %}{{ relbar_custom() }}{% endblock %} 61 | {% block relbar2 %}{{ relbar_custom() }}{% endblock %} 62 | -------------------------------------------------------------------------------- /17/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | # the i18n builder cannot share the environment and doctrees with the others 15 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 16 | 17 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 18 | 19 | help: 20 | @echo "Please use \`make ' where is one of" 21 | @echo " html to make standalone HTML files" 22 | @echo " dirhtml to make HTML files named index.html in directories" 23 | @echo " singlehtml to make a single large HTML file" 24 | @echo " pickle to make pickle files" 25 | @echo " json to make JSON files" 26 | @echo " htmlhelp to make HTML files and a HTML help project" 27 | @echo " qthelp to make HTML files and a qthelp project" 28 | @echo " devhelp to make HTML files and a Devhelp project" 29 | @echo " epub to make an epub" 30 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 31 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 32 | @echo " text to make text files" 33 | @echo " man to make manual pages" 34 | @echo " texinfo to make Texinfo files" 35 | @echo " info to make Texinfo files and run them through makeinfo" 36 | @echo " gettext to make PO message catalogs" 37 | @echo " changes to make an overview of all changed/added/deprecated items" 38 | @echo " linkcheck to check all external links for integrity" 39 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 40 | 41 | clean: 42 | -rm -rf $(BUILDDIR)/* 43 | 44 | html: 45 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 48 | 49 | dirhtml: 50 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 51 | @echo 52 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 53 | 54 | singlehtml: 55 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 56 | @echo 57 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 58 | 59 | pickle: 60 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 61 | @echo 62 | @echo "Build finished; now you can process the pickle files." 63 | 64 | json: 65 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 66 | @echo 67 | @echo "Build finished; now you can process the JSON files." 68 | 69 | htmlhelp: 70 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 71 | @echo 72 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 73 | ".hhp project file in $(BUILDDIR)/htmlhelp." 74 | 75 | qthelp: 76 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 77 | @echo 78 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 79 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 80 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/How_To_Tango_With_Django.qhcp" 81 | @echo "To view the help file:" 82 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/How_To_Tango_With_Django.qhc" 83 | 84 | devhelp: 85 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 86 | @echo 87 | @echo "Build finished." 88 | @echo "To view the help file:" 89 | @echo "# mkdir -p $$HOME/.local/share/devhelp/How_To_Tango_With_Django" 90 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/How_To_Tango_With_Django" 91 | @echo "# devhelp" 92 | 93 | epub: 94 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 95 | @echo 96 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 97 | 98 | latex: 99 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 100 | @echo 101 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 102 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 103 | "(use \`make latexpdf' here to do that automatically)." 104 | 105 | latexpdf: 106 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 107 | @echo "Running LaTeX files through pdflatex..." 108 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 109 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 110 | 111 | text: 112 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 113 | @echo 114 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 115 | 116 | man: 117 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 118 | @echo 119 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 120 | 121 | texinfo: 122 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 123 | @echo 124 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 125 | @echo "Run \`make' in that directory to run these through makeinfo" \ 126 | "(use \`make info' here to do that automatically)." 127 | 128 | info: 129 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 130 | @echo "Running Texinfo files through makeinfo..." 131 | make -C $(BUILDDIR)/texinfo info 132 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 133 | 134 | gettext: 135 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 136 | @echo 137 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 138 | 139 | changes: 140 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 141 | @echo 142 | @echo "The overview file is in $(BUILDDIR)/changes." 143 | 144 | linkcheck: 145 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 146 | @echo 147 | @echo "Link check complete; look for any errors in the above output " \ 148 | "or in $(BUILDDIR)/linkcheck/output.txt." 149 | 150 | doctest: 151 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 152 | @echo "Testing of doctests in the sources finished, look at the " \ 153 | "results in $(BUILDDIR)/doctest/output.txt." 154 | -------------------------------------------------------------------------------- /17/chapters/acknowledgements.rst: -------------------------------------------------------------------------------- 1 | Acknowledgements 2 | ================ 3 | 4 | The first version of this book began because my students were struggling to pick up the Django Framework as part of the course I teach on Web Application Development. However, it became painfully clear that the official Django Tutorials made many assumptions regarding one's background, missed out 5 | crucial steps here and there that would trip up the students, and finally, it was clear that the students lacked the vocabulary to google for the right things to resolve any problems that did arise (and also that they didn't have hours to spend trying to figure out what was going on). 6 | 7 | I realised that to go from woe to go required a lot of additional information and help to resolve common problems. For this I often consulted stackoverflow.com for advice, help and explanations, along with other sites - the folk who have contributed to these sites have been an invaluable source of knowledge which I have tried to distill and combine here. Thanks for your help it is very much appreciated. 8 | 9 | Leif 10 | 11 | 12 | In this book, we have pulled together the relevant information and details so that students and beginners to web development can go through the process in a seamless fashion and learn the basics of web application development. After realising the book we have had numerous people contact us with ways to improve the quality of the book. So we'd like to thank: 13 | 14 | * Manoel Maria ‏@xmadruga157 15 | * Codenius @Codenius 16 | * Ally Weir 17 | * Can Ibanoglu @canlbanoglu 18 | * Sadegh Kh ‏@IR_Melbourne 19 | * Jan Felix Trettow ‏@JanFelixTrettow 20 | * Rezha Julio ‏@kimiamania 21 | * Thomas Murphy ‏@TMurphyMusic 22 | * Saurabh Tandon ‏@saurabhtand 23 | * Pierre-Yves Mathieu https://github.com/pywebdesign 24 | * Dhiraj Thakur https://github.com/dhirajt 25 | * Svante Kvarnström @sjktje 26 | * Ramdog https://github.com/ramdog 27 | * Krace Kumar https://github.com/kracekumar 28 | * James Yeo 29 | * Michael Ho Chum https://github.com/michaelchum 30 | * Jonathan Sundqvist https://github.com/jonathan-s 31 | * nolan-m https://github.com/nolan-m 32 | * Kartik Singhal https://github.com/k4rtik 33 | * William Vincent 34 | * Mike Gleen 35 | * Oleg Belausov 36 | * Adam Kikowski 37 | * Thomas Whyyou @thomaswhyyou 38 | * Dan C 39 | * Saex https://github.com/SaeX 40 | * Breakerfall https://github.com/breakerfall 41 | * Michael Herman https://github.com/mjhea0 42 | * Praestgias https://github.com/praestigias 43 | * Claus Conrad https://github.com/cconrad 44 | * nCrazed https://github.com/nCrazed 45 | * rnevius https://github.com/rnevius 46 | 47 | for their suggestions, comments and feedback, which have greatly improved the quality of this resource. 48 | 49 | 50 | Leif and David 51 | 52 | -------------------------------------------------------------------------------- /17/chapters/game.rst.out: -------------------------------------------------------------------------------- 1 | Sessions and Cookies: A Search Game 2 | =================================== 3 | 4 | * This part of the tutorial focus on Working with sessions and cookies. 5 | * The aim is to add a game to the application which is like PageHunt/Fu-Finder/PageFetch 6 | * In the game, a player will be able to choose a category 7 | * Then they will be shown a random page from the category, using search functionality they will need to enter a query to find the page. 8 | * They have up to 5 attempts to find the page, and they are shown 5 random pages. 9 | 10 | 11 | Setting up the game 12 | ------------------- 13 | 14 | Creating a Game Model 15 | ..................... 16 | 17 | 18 | Creating a Game View/Template 19 | ............................. 20 | 21 | * Select Category 22 | * Select/Define number of pages (i.e. game length) 23 | * Set Cookie with GameID 24 | 25 | * Add a record into the Game Model (this player is play a game in a certain category) 26 | * Initial the game values 27 | 28 | Creating a Game Play View/Template 29 | .................................. 30 | 31 | * Get Game object for the player (using GameID from cookie) 32 | 33 | 34 | 35 | Creating an End Game View/Template 36 | .................................. 37 | 38 | 39 | Lab Exercises 40 | ------------- 41 | * Add a Leaderboard View/Template 42 | * Create a game that is time based (i.e. times out after 3 minutes) 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /17/chapters/javascript.rst: -------------------------------------------------------------------------------- 1 | Javascript and JQuery 2 | --------------------- 3 | In the next edition we'll be adding in tutorials on how to use Javascript and JQuery within Web Application. -------------------------------------------------------------------------------- /17/chapters/new17.rst: -------------------------------------------------------------------------------- 1 | .. _new17-label: 2 | 3 | 4 | 5 | New in TwD 1.7 6 | ============== 7 | 8 | .. warning:: Please note that this version of the book is still in the draft phase. Though it should all pretty much work (however some links and screenshots need to be updated). Please report any bugs, problems, etc, or submit change requests via GitHub: https://github.com/leifos/tango_with_django_book/tree/master/17 9 | 10 | 11 | In this version of the online tutorial / book, we have updated and added a number of things: 12 | 13 | * The code has been ported to work with Django 1.7 14 | 15 | * The database interaction has been updated from ``syncdb`` to ``migratesql`` and ``migrate`` 16 | * Rendering responses has been updated from ``render_to_response`` to ``render``. So now there is no need to request the context in every view. 17 | * The ``url`` template tag is now being used in templates, which provides a relative reference to urls rather than an absolute reference.. 18 | * Loading static files in the templates is now done with {% load staticfiles %} 19 | * Using ``slugify`` to create well formed URL strings 20 | 21 | * A new chapter on authentication has been added 22 | 23 | * Where the login and registration is done with Django-Registration-Redux (see Chapter :ref:`login-redux-label`) 24 | 25 | * The Bootstrap chapter has been updated to use Bootstrap 3.2.0 (see Chapter :ref:`bootstrap-chapter`) 26 | 27 | * Also, includes some notes on how to use Django-Bootstrap-Toolkit 28 | 29 | * A new chapter has been added on using template tags (see Chapter :ref:`template-tag-chapter` ) 30 | 31 | * Add a chapter on using JQuery with Django (see Chapter :ref:`jquery`) 32 | 33 | * The chapter on testing has been expanded - but is still a work in progress (see Chapter :ref:`test-chapter`) 34 | 35 | * Includes how to use the package ``coverage`` to measure test coverage (see http://nedbatchelder.com/code/coverage/ ) 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /17/chapters/summary.rst: -------------------------------------------------------------------------------- 1 | Summary 2 | ======= 3 | 4 | In this book, we have gone through the process of web development from specification to deployment. Along the way we have shown how to use the Django framework to construct the models, views and templates associated with a web application. We have also demonstrated how toolkits and services like Bootstrap, JQuery, Bing Search, PythonAnywhere, etc can be integrated within an application. However, the road doesn't stop here. While, as we have only painted the broad brush strokes of a web application - as you have probably noticed there are lots of improvements that could be made to Rango - and these finer details often take a lot more time to complete as you polish the application. By developing your application on a firm base and good setup you will be able to construct up to 80% of your site very rapidly and get a working demo online. 5 | 6 | In future versions of this book we intend to provide some more details on various aspects of the framework, along with covering the basics of some of the other fundamental technologies associated with web development. If you have any suggestions or comments about how to improve the book please get in touch. 7 | 8 | Please report any bugs, problems, etc, or submit change requests via GitHub: https://github.com/leifos/tango_with_django_book/tree/master/17 -------------------------------------------------------------------------------- /17/chapters/tango.rst: -------------------------------------------------------------------------------- 1 | .. _tango-label: 2 | .. _tango-chapter: 3 | 4 | Making Rango Tango! Exercises 5 | ============================= 6 | 7 | So far we have been adding in different pieces of functionality to Rango. We've been building up the application in this manner to get you familiar with the Django Framework, and to learn about how to construct the various parts of a website that you are likely to make in your own projects. Rango however at the present moment is not very cohesive. In this chapter, we challenge you to improve the application and its user experience by bringing together functionality that we've already implemented alongside some awesome new additions. 8 | 9 | To make Rango more coherent and integrated it would be nice to add the following functionality. 10 | 11 | * Track the click throughs of Categories and Pages, i.e.: 12 | * count the number of times a category is viewed; 13 | * count the number of times a page is viewed via Rango; and 14 | * collect likes for categories (see Chapter :ref:`ajax-label`). 15 | 16 | * Integrate the browsing and searching within categories, i.e.: 17 | * instead of having a disconnected search page, let users search for pages on each specific category page 18 | 19 | * let users filter the set of categories shown in the side bar (see Chapter :ref:`ajax-label`); and 20 | * instead of refreshing the entire page, when users search, it only updates the results (see Chapter :ref:`ajax-label`) 21 | 22 | * Provide services for Registered Users, i.e.: 23 | * Assuming you have switched the django-registration-redux, we need to setup the registration form to collect the additional information (i.e. website, profile picture) 24 | * let users view their profile; 25 | * let users edit their profile; and 26 | * let users see the list of users and their profiles. 27 | 28 | 29 | .. note:: We won't be working through all of these tasks right now. Some will be taken care of in Chapter :ref:`ajax-label`, while some will be left to you to complete as additional exercises. 30 | 31 | Before we start to add this additional functionality we will make a todo list to plan our workflow for each task. Breaking tasks down into sub-tasks will greatly simplify the implementation so that we are attacking each one with a clear plan. In this chapter, we will provide you with the workflow for a number of the above tasks. From what you have learnt so far, you should be able to fill in the gaps and implement most of it on your own (except those requiring AJAX). In the next chapter, we have included code snipets and elaborated on how to implement these features. 32 | 33 | 34 | Track Page Click Throughs 35 | ------------------------- 36 | Currently, Rango provides a direct link to external pages. This is not very good if you want to track the number of times each page is clicked and viewed. To count the number of times a page is viewed via Rango you will need to perform the following steps. 37 | 38 | * Create a new view called ``track_url()``, and map it to URL ``/rango/goto/`` and name it ``'name=goto'``. 39 | * The ``track_url()`` view will examine the HTTP ``GET`` request parameters and pull out the ``page_id``. The HTTP ``GET`` requests will look something like ``/rango/goto/?page_id=1``. 40 | * In the view, select/get the ``page`` with ``page_id`` and then increment the associated ``views`` field, and ``save()`` it. 41 | * Have the view redirect the user to the specified URL using Django's ``redirect`` method. 42 | * If no parameters are in the HTTP ``GET`` request for ``page_id``, or the parameters do not return a ``Page`` object, redirect the user to Rango's homepage. 43 | * Update the ``category.html`` so that it uses ``/rango/goto/?page_id=XXX`` instead of using the direct URL, remember to use the ``url`` templatetag (i.e. ) 44 | 45 | Hint 46 | .... 47 | If you're unsure of how to retrieve the ``page_id`` *querystring* from the HTTP ``GET`` request, the following code sample should help you. 48 | 49 | .. code-block:: python 50 | 51 | if request.method == 'GET': 52 | if 'page_id' in request.GET: 53 | page_id = request.GET['page_id'] 54 | 55 | Always check the request method is of type ``GET`` first, then you can access the dictionary ``request.GET`` which contains values passed as part of the request. If ``page_id`` exists within the dictionary, you can pull the required value out with ``request.GET['page_id']``. 56 | 57 | 58 | .. note:: You could also do this without using a querystring, but through the URL instead, i.e. ``/rango/goto//``. In which case you would need to create a urlpattern that pulls out the page_id. 59 | 60 | 61 | Searching Within a Category Page 62 | -------------------------------- 63 | Rango aims to provide users with a helpful directory of page links. At the moment, the search functionality is essentially independent of the categories. It would be nicer to have search integrated into category browsing. Let's assume that a user will first browse their category of interest first. If they can't find the page that they want, they can then search for it. If they find a page that is suitable, then they can add it to the category that they are in. Let's focus on the first problem, of putting search on the category page. To do this, perform the following steps: 64 | 65 | * Remove the generic *Search* link from the menu bar, i.e. we are decommissioning the global search function. 66 | * Take the search form and results template markup from ``search.html`` and place it into ``category.html``. 67 | * Update the search form so that that action refers back to the category page, i.e.: ``
`` 68 | * Update the category view to handle a HTTP ``POST`` request. The view must then include any search results in the context dictionary for the template to render. 69 | 70 | * Also, lets make it so that only authenticated users can search. So include ``{% if user.authenticated %}`` to the ``category.html`` template to restrict access. 71 | 72 | 73 | Create and View Profiles 74 | ------------------------ 75 | If you have swapped over to the ``django-registration-redux`` package, then you'll have to collect the ``UserProfile`` data. 76 | To do this, instead of re-directed the user to the rango index page, you will need re-direct them to a new form, to collect the website and url details. To add the UserProfile registration functionality: 77 | 78 | * Create a ``profile_registration.html`` which will display the ``UserProfileForm``. 79 | * Create a ``register_profile()`` view to capture the profile detials 80 | * Map the view to a url, i.e. ``rango/add_profile/``. 81 | * In the ``MyRegistrationView`` update the ``get_success_url()`` to point to ``rango/add_profile/`` 82 | 83 | Another useful feature to let users inspect and edit their own profile. Undertake the following steps to add this functionality. 84 | 85 | * First, create a template called ``profile.html``. In this template, add in the fields associated with the user profile and the user (i.e. username, email, website and picture). 86 | * Create a view called ``profile()``. This view will obtain the data required to render the user profile template. 87 | * Map the URL ``/rango/profile/`` to your new ``profile()`` view. 88 | * In the base template add a link called *Profile* into the menu bar, preferably on the right-hand side with other user-related links. This should only be available to users who are logged in (i.e. ``{% if user.is_authenticated %}``). 89 | 90 | To let users browse through user profiles, you can create a users page, that lists all the users. If you click on a user page, then you can see their profile (but the user can only edit their own page). 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /17/chapters/template_tags.rst: -------------------------------------------------------------------------------- 1 | .. _template-tag-chapter: 2 | 3 | Template Tags 4 | ============= 5 | 6 | 7 | Providing Categories on Every Page 8 | ---------------------------------- 9 | It would be nice to show the different categories that users can browse through in the sidebar on each page. Given what we have learnt so far we could do the following: 10 | 11 | * In the ``base.html`` template we could add some code to display an item list of categories, if the category list has been passed through. 12 | * Then in each view, we could access the Category object, get all the categories, and return that in the context dictionary. 13 | 14 | However, this is a pretty nasty solution. It requires a lot of cutting and pasting of code. Also, we will run into problems, when we want to show the categories on pages serviced by the django-registration-redux package. So we need a different approach, by using ``templatetags`` that are included in the template that request the data required. 15 | 16 | 17 | Using Template Tags 18 | -------------------- 19 | Create a directory ``rango/templatetags``, and create two files, one called ``__init__.py``, which will be empty, and another called, ``rango_extras.py``, where you can add the following code: 20 | 21 | .. code-block:: python 22 | 23 | from django import template 24 | from rango.models import Category 25 | 26 | register = template.Library() 27 | 28 | @register.inclusion_tag('rango/cats.html') 29 | def get_category_list(): 30 | return {'cats': Category.objects.all()} 31 | 32 | 33 | 34 | As you can see we have made a method called, ``get_category_list()`` which returns the list of categories, and that is assocaited with a template called ``rango/cats.html``. Now create a template called ''rango/cats.html`` in the templates directory with the following code: 35 | 36 | .. code-block:: html 37 | 38 | {% if cats %} 39 | 48 | {% endif %} 49 | 50 | 51 | Now in your ``base.html`` you can access the templatetag by first loading it up with ``{% load rango_extras %}`` and then slotting it into the page with ``{% get_category_list %}``, i.e.: 52 | 53 | .. code-block:: html 54 | 55 | 62 | 63 | 64 | .. note:: You will need to restart your server every time you modify the templatetags so that they are registered. 65 | 66 | 67 | Parameterised Template Tags 68 | --------------------------- 69 | 70 | Now lets extend this so that when we visit a category page, it highlights which category we are in. To do this we need to paramterise the templatetag. So update the method in ``rango_extras.py`` to be: 71 | 72 | .. code-block:: python 73 | 74 | def get_category_list(cat=None): 75 | return {'cats': Category.objects.all(), 'act_cat': cat} 76 | 77 | 78 | This lets us pass through the category we are on. We can now update the ``base.html`` to pass through the category, if it exists. 79 | 80 | .. code-block:: html 81 | 82 | 89 | 90 | 91 | Now update the ``cats.html`` template: 92 | 93 | 94 | .. code-block:: html 95 | 96 | {% for c in cats %} 97 | {% if c == act_cat %}
  • {% else %}
  • {% endif %} 98 | {{ c.name }}
  • 99 | {% endfor %} 100 | 101 | Here we check to see if the category being displayed is the same as the category being passed through (i.e. ``act_cat``), if so, we assign the ``active`` class to it from Bootstrap (http://getbootstrap.com/components/#nav). 102 | 103 | 104 | Restart the development web server, and now visit the pages. We have passed through the ``category`` variable. When you view a category page, the template has access to the ``category`` variable, and so provides a value to the templatetag ``get_category_list()``. This is then used in the ``cats.html`` template to select which category to highlight as active. 105 | 106 | 107 | -------------------------------------------------------------------------------- /17/chapters/virtual.rst: -------------------------------------------------------------------------------- 1 | Virtual Environments 2 | ==================== 3 | 4 | To create a virtual enironment use: 5 | 6 | mkvirtualenv 7 | 8 | 9 | 10 | 11 | 12 | To list what virtual environments use: 13 | 14 | lsvirtualenv 15 | 16 | -b provides a brief listing. 17 | -------------------------------------------------------------------------------- /17/images/admin-populated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/admin-populated.png -------------------------------------------------------------------------------- /17/images/bbcnews-cookies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/bbcnews-cookies.png -------------------------------------------------------------------------------- /17/images/bing-explore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/bing-explore.png -------------------------------------------------------------------------------- /17/images/canvas.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-07-26 20:44ZCanvas 1Layer 1Rango image hosted on flickr under Creative Commons licence - user elbragon 4 | -------------------------------------------------------------------------------- /17/images/ch1-rango-cat-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch1-rango-cat-page.png -------------------------------------------------------------------------------- /17/images/ch1-rango-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch1-rango-index.png -------------------------------------------------------------------------------- /17/images/ch11-bootstrap-about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch11-bootstrap-about.png -------------------------------------------------------------------------------- /17/images/ch11-bootstrap-category-initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch11-bootstrap-category-initial.png -------------------------------------------------------------------------------- /17/images/ch11-bootstrap-index-initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch11-bootstrap-index-initial.png -------------------------------------------------------------------------------- /17/images/ch11-bootstrap-index-rows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch11-bootstrap-index-rows.png -------------------------------------------------------------------------------- /17/images/ch11-bootstrap-login-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch11-bootstrap-login-custom.png -------------------------------------------------------------------------------- /17/images/ch11-bootstrap-register-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch11-bootstrap-register-custom.png -------------------------------------------------------------------------------- /17/images/ch11-bootstrap-register-initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch11-bootstrap-register-initial.png -------------------------------------------------------------------------------- /17/images/ch4-rango-about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch4-rango-about.png -------------------------------------------------------------------------------- /17/images/ch4-rango-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch4-rango-index.png -------------------------------------------------------------------------------- /17/images/ch5-rango-admin-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch5-rango-admin-custom.png -------------------------------------------------------------------------------- /17/images/ch5-rango-admin-models.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch5-rango-admin-models.png -------------------------------------------------------------------------------- /17/images/ch5-rango-admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch5-rango-admin.png -------------------------------------------------------------------------------- /17/images/ch6-rango-index-category-pages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch6-rango-index-category-pages.png -------------------------------------------------------------------------------- /17/images/ch6-rango-index-category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch6-rango-index-category.png -------------------------------------------------------------------------------- /17/images/ch7-rango-category-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch7-rango-category-add.png -------------------------------------------------------------------------------- /17/images/ch7-rango-category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch7-rango-category.png -------------------------------------------------------------------------------- /17/images/ch9-rango-add-category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch9-rango-add-category.png -------------------------------------------------------------------------------- /17/images/ch9-rango-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch9-rango-index.png -------------------------------------------------------------------------------- /17/images/ch9-rango-python-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/ch9-rango-python-page.png -------------------------------------------------------------------------------- /17/images/cookie-visits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/cookie-visits.png -------------------------------------------------------------------------------- /17/images/cover_image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/cover_image.pdf -------------------------------------------------------------------------------- /17/images/css-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-basic.png -------------------------------------------------------------------------------- /17/images/css-blocks-before.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-blocks-before.pdf -------------------------------------------------------------------------------- /17/images/css-blocks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-blocks.pdf -------------------------------------------------------------------------------- /17/images/css-box-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-box-example.pdf -------------------------------------------------------------------------------- /17/images/css-box-example2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-box-example2.pdf -------------------------------------------------------------------------------- /17/images/css-box-model.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-box-model.pdf -------------------------------------------------------------------------------- /17/images/css-box-model.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-09-15 15:32ZCanvas 1Layer 1Content of ElementKey:ContentPaddingBorderMargin 4 | -------------------------------------------------------------------------------- /17/images/css-cascading.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-cascading.pdf -------------------------------------------------------------------------------- /17/images/css-cascading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-cascading.png -------------------------------------------------------------------------------- /17/images/css-cascading.svg/image1.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-cascading.svg/image1.tiff -------------------------------------------------------------------------------- /17/images/css-cascading.svg/image2.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-cascading.svg/image2.tiff -------------------------------------------------------------------------------- /17/images/css-cascading.svg/image3.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-cascading.svg/image3.tiff -------------------------------------------------------------------------------- /17/images/css-class.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-class.pdf -------------------------------------------------------------------------------- /17/images/css-class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-class.png -------------------------------------------------------------------------------- /17/images/css-colours.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-colours.pdf -------------------------------------------------------------------------------- /17/images/css-h1-highlighting.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-h1-highlighting.pdf -------------------------------------------------------------------------------- /17/images/css-id.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-id.pdf -------------------------------------------------------------------------------- /17/images/css-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-id.png -------------------------------------------------------------------------------- /17/images/css-links-hover.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-links-hover.pdf -------------------------------------------------------------------------------- /17/images/css-lists-cats-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-lists-cats-end.png -------------------------------------------------------------------------------- /17/images/css-lists-cats-float.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-lists-cats-float.pdf -------------------------------------------------------------------------------- /17/images/css-lists-which.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-lists-which.png -------------------------------------------------------------------------------- /17/images/css-navbar-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-navbar-basic.png -------------------------------------------------------------------------------- /17/images/css-nesting-blocks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-nesting-blocks.pdf -------------------------------------------------------------------------------- /17/images/css-positioning-absolute1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-positioning-absolute1.pdf -------------------------------------------------------------------------------- /17/images/css-positioning-absolute2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-positioning-absolute2.pdf -------------------------------------------------------------------------------- /17/images/css-positioning-float1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-positioning-float1.pdf -------------------------------------------------------------------------------- /17/images/css-positioning-float2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-positioning-float2.pdf -------------------------------------------------------------------------------- /17/images/css-positioning-relative.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-positioning-relative.pdf -------------------------------------------------------------------------------- /17/images/css-render.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-render.pdf -------------------------------------------------------------------------------- /17/images/css-render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-render.png -------------------------------------------------------------------------------- /17/images/css-tidied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/css-tidied.png -------------------------------------------------------------------------------- /17/images/deploy-pythonanywhere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/deploy-pythonanywhere.png -------------------------------------------------------------------------------- /17/images/django-dev-server-firstrun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/django-dev-server-firstrun.png -------------------------------------------------------------------------------- /17/images/git-sequence.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/git-sequence.pdf -------------------------------------------------------------------------------- /17/images/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/man.png -------------------------------------------------------------------------------- /17/images/rango-admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-admin.png -------------------------------------------------------------------------------- /17/images/rango-categories-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-categories-simple.png -------------------------------------------------------------------------------- /17/images/rango-css-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-css-1.png -------------------------------------------------------------------------------- /17/images/rango-css-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-css-2.png -------------------------------------------------------------------------------- /17/images/rango-css-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-css-3.png -------------------------------------------------------------------------------- /17/images/rango-css-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-css-4.png -------------------------------------------------------------------------------- /17/images/rango-erd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-erd.png -------------------------------------------------------------------------------- /17/images/rango-erd.svg: -------------------------------------------------------------------------------- 1 | CategoryPage
    houses
    [Object]
    -------------------------------------------------------------------------------- /17/images/rango-erd.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /17/images/rango-form-steps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-form-steps.pdf -------------------------------------------------------------------------------- /17/images/rango-form-steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-form-steps.png -------------------------------------------------------------------------------- /17/images/rango-hello-world-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-hello-world-template.png -------------------------------------------------------------------------------- /17/images/rango-hello-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-hello-world.png -------------------------------------------------------------------------------- /17/images/rango-links.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-links.pdf -------------------------------------------------------------------------------- /17/images/rango-links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-links.png -------------------------------------------------------------------------------- /17/images/rango-login-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-login-message.png -------------------------------------------------------------------------------- /17/images/rango-ntier-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-ntier-architecture.png -------------------------------------------------------------------------------- /17/images/rango-ntier-architecture.svg: -------------------------------------------------------------------------------- 1 |

    Search API
    [Object]
    Database
    [Object]
    Middleware
    [Object]
    Client
    [Object]
    -------------------------------------------------------------------------------- /17/images/rango-ntier-architecture.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /17/images/rango-picture.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-picture.pdf -------------------------------------------------------------------------------- /17/images/rango-picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-picture.png -------------------------------------------------------------------------------- /17/images/rango-register-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-register-form.png -------------------------------------------------------------------------------- /17/images/rango-site-with-pic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-site-with-pic.pdf -------------------------------------------------------------------------------- /17/images/rango-site-with-pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-site-with-pic.png -------------------------------------------------------------------------------- /17/images/rango-template-inheritance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/rango-template-inheritance.pdf -------------------------------------------------------------------------------- /17/images/relational-schema-basic-models.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/relational-schema-basic-models.pdf -------------------------------------------------------------------------------- /17/images/session-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/session-id.png -------------------------------------------------------------------------------- /17/images/terminal_directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/terminal_directory.png -------------------------------------------------------------------------------- /17/images/test-cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/test-cookie.png -------------------------------------------------------------------------------- /17/images/twd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/twd.ico -------------------------------------------------------------------------------- /17/images/twd200x200.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/twd200x200.jpg -------------------------------------------------------------------------------- /17/images/url-chain.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/url-chain.pdf -------------------------------------------------------------------------------- /17/images/url-chain.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-10-02 13:26ZCanvas 1Layer 1http://www.servername.com/rango/indexDomain nameProject configuration urls.pyRango urls.py 4 | -------------------------------------------------------------------------------- /17/images/wireframe_cat.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/wireframe_cat.pdf -------------------------------------------------------------------------------- /17/images/wireframe_default.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/images/wireframe_default.pdf -------------------------------------------------------------------------------- /17/index.rst: -------------------------------------------------------------------------------- 1 | .. How_To_Tango_With_Django documentation master file, created by 2 | sphinx-quickstart on Thu Dec 20 15:10:50 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | How To Tango With Django 1.7 7 | ==================================================== 8 | 9 | 10 | .. toctree:: 11 | :maxdepth: 3 12 | :numbered: 13 | 14 | chapters/new17 15 | chapters/overview 16 | chapters/requirements 17 | chapters/setup 18 | chapters/templates_static 19 | chapters/models 20 | chapters/models_templates 21 | chapters/forms 22 | chapters/login 23 | chapters/templates 24 | chapters/cookie 25 | chapters/login_redux 26 | chapters/bootstrap 27 | chapters/template_tags 28 | chapters/bing_search 29 | chapters/tango 30 | chapters/tango_too 31 | chapters/jquery 32 | chapters/ajax 33 | chapters/test 34 | chapters/deploy 35 | chapters/summary 36 | 37 | chapters/git 38 | chapters/css_intro 39 | 40 | 41 | 42 | chapters/acknowledgements 43 | chapters/javascript 44 | chapters/virtual 45 | 46 | 47 | Indices and tables 48 | ================== 49 | 50 | * :ref:`genindex` 51 | * :ref:`modindex` 52 | * :ref:`search` 53 | 54 | -------------------------------------------------------------------------------- /17/new_images/ch_models_admin_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/new_images/ch_models_admin_interface.png -------------------------------------------------------------------------------- /17/new_images/ch_models_template_categories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/new_images/ch_models_template_categories.png -------------------------------------------------------------------------------- /17/new_images/ch_setup_it_worked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/new_images/ch_setup_it_worked.png -------------------------------------------------------------------------------- /17/omnigraffle/css-blocks-before.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-blocks-before.graffle/image4.png -------------------------------------------------------------------------------- /17/omnigraffle/css-cascading.graffle/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-cascading.graffle/data.plist -------------------------------------------------------------------------------- /17/omnigraffle/css-cascading.graffle/image1.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-cascading.graffle/image1.tiff -------------------------------------------------------------------------------- /17/omnigraffle/css-cascading.graffle/image2.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-cascading.graffle/image2.tiff -------------------------------------------------------------------------------- /17/omnigraffle/css-cascading.graffle/image3.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-cascading.graffle/image3.tiff -------------------------------------------------------------------------------- /17/omnigraffle/css-h1-highlighting.graffle/image2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-h1-highlighting.graffle/image2.pdf -------------------------------------------------------------------------------- /17/omnigraffle/css-links-hover.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-links-hover.graffle/image1.png -------------------------------------------------------------------------------- /17/omnigraffle/css-links-hover.graffle/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-links-hover.graffle/image2.png -------------------------------------------------------------------------------- /17/omnigraffle/css-links-hover.graffle/image3.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/css-links-hover.graffle/image3.eps -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/data.plist -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image1.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image10.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image11.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image12.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image12.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image13.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image13.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image14.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image14.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image15.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image15.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image16.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image16.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image17.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image17.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image18.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image18.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image19.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image19.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image2.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image20.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image20.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image21.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image21.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image22.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image23.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image23.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image24.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image24.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image25.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image25.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image26.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image26.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image3.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image4.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image5.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image6.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image7.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image8.pdf -------------------------------------------------------------------------------- /17/omnigraffle/konigi_wireframe_stencils.gstencil/image9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/konigi_wireframe_stencils.gstencil/image9.pdf -------------------------------------------------------------------------------- /17/omnigraffle/rango-form-steps.graffle/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-form-steps.graffle/image11.png -------------------------------------------------------------------------------- /17/omnigraffle/rango-form-steps.graffle/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-form-steps.graffle/image6.png -------------------------------------------------------------------------------- /17/omnigraffle/rango-links.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-links.graffle/image1.png -------------------------------------------------------------------------------- /17/omnigraffle/rango-links.graffle/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-links.graffle/image3.png -------------------------------------------------------------------------------- /17/omnigraffle/rango-links.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-links.graffle/image4.png -------------------------------------------------------------------------------- /17/omnigraffle/rango-picture.graffle/image3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-picture.graffle/image3.pdf -------------------------------------------------------------------------------- /17/omnigraffle/rango-picture.graffle/image4.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-picture.graffle/image4.tiff -------------------------------------------------------------------------------- /17/omnigraffle/rango-site-with-pic.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaksimDzhangirov/tango_with_django_book/7ef14f20642549f5f896150998ed18495d7a2874/17/omnigraffle/rango-site-with-pic.graffle/image1.png -------------------------------------------------------------------------------- /17/sphinx-extensions/numfig.py: -------------------------------------------------------------------------------- 1 | from docutils.nodes import figure, caption, Text, reference, raw, SkipNode, Element 2 | from sphinx.roles import XRefRole 3 | 4 | # 5 | # numfig Sphinx extension 6 | # Check out https://bitbucket.org/arjones6/sphinx-numfig/wiki/Home for the documentation (as of 2013-07-16) 7 | # Comment added by dmax 8 | # 9 | 10 | # Element classes 11 | 12 | class page_ref(reference): 13 | pass 14 | 15 | class num_ref(reference): 16 | pass 17 | 18 | def skip_num_ref(self, node): 19 | raise SkipNode 20 | 21 | # Visit/depart functions 22 | 23 | def skip_page_ref(self, node): 24 | raise SkipNode 25 | 26 | def latex_visit_page_ref(self, node): 27 | self.body.append("\\pageref{%s:%s}" % (node['refdoc'], node['reftarget'])) 28 | raise SkipNode 29 | 30 | def latex_visit_num_ref(self, node): 31 | fields = node['reftarget'].split('#') 32 | if len(fields) > 1: 33 | label, target = fields 34 | ref_link = '%s:%s' % (node['refdoc'], target) 35 | latex = "\\hyperref[%s]{%s \\ref*{%s}}" % (ref_link, label, ref_link) 36 | self.body.append(latex) 37 | else: 38 | self.body.append('\\ref{%s:%s}' % (node['refdoc'], fields[0])) 39 | 40 | raise SkipNode 41 | 42 | 43 | def doctree_read(app, doctree): 44 | # first generate figure numbers for each figure 45 | env = app.builder.env 46 | figid_docname_map = getattr(env, 'figid_docname_map', {}) 47 | 48 | for figure_info in doctree.traverse(figure): 49 | for id in figure_info['ids']: 50 | figid_docname_map[id] = env.docname 51 | 52 | env.figid_docname_map = figid_docname_map 53 | 54 | 55 | def doctree_resolved(app, doctree, docname): 56 | i = 1 57 | figids = {} 58 | for figure_info in doctree.traverse(figure): 59 | if app.builder.name != 'latex' and app.config.number_figures: 60 | for cap in figure_info.traverse(caption): 61 | cap[0] = Text("%s %d: %s" % (app.config.figure_caption_prefix, i, cap[0])) 62 | 63 | for id in figure_info['ids']: 64 | figids[id] = i 65 | 66 | i += 1 67 | 68 | 69 | # replace numfig nodes with links 70 | if app.builder.name != 'latex': 71 | for ref_info in doctree.traverse(num_ref): 72 | if '#' in ref_info['reftarget']: 73 | label, target = ref_info['reftarget'].split('#') 74 | labelfmt = label + " %d" 75 | else: 76 | labelfmt = '%d' 77 | target = ref_info['reftarget'] 78 | 79 | if target not in figids: 80 | continue 81 | 82 | if app.builder.name == 'html': 83 | target_doc = app.builder.env.figid_docname_map[target] 84 | link = "%s#%s" % (app.builder.get_relative_uri(docname, target_doc), 85 | target) 86 | html = '%s' % (link, labelfmt %(figids[target])) 87 | ref_info.replace_self(raw(html, html, format='html')) 88 | else: 89 | ref_info.replace_self(Text(labelfmt % (figids[target]))) 90 | 91 | 92 | def clean_env(app): 93 | app.builder.env.i=1 94 | app.builder.env.figid_docname_map = {} 95 | 96 | def setup(app): 97 | app.add_config_value('number_figures', True, True) 98 | app.add_config_value('figure_caption_prefix', "Figure", True) 99 | 100 | app.add_node(page_ref, 101 | text=(skip_page_ref, None), 102 | html=(skip_page_ref, None), 103 | latex=(latex_visit_page_ref, None)) 104 | 105 | app.add_role('page', XRefRole(nodeclass=page_ref)) 106 | 107 | app.add_node(num_ref, 108 | html=(skip_num_ref, None), 109 | latex=(latex_visit_num_ref, None)) 110 | 111 | app.add_role('num', XRefRole(nodeclass=num_ref)) 112 | 113 | app.connect("builder-inited", clean_env) 114 | app.connect('doctree-read', doctree_read) 115 | app.connect('doctree-resolved', doctree_resolved) 116 | -------------------------------------------------------------------------------- /17/sphinx-extensions/numsec.py: -------------------------------------------------------------------------------- 1 | """ 2 | Changes section references to be the section number 3 | instead of the title of the section. 4 | """ 5 | 6 | from docutils import nodes 7 | import sphinx.domains.std 8 | 9 | class CustomStandardDomain(sphinx.domains.std.StandardDomain): 10 | 11 | def __init__(self, env): 12 | env.settings['footnote_references'] = 'superscript' 13 | sphinx.domains.std.StandardDomain.__init__(self, env) 14 | 15 | def resolve_xref(self, env, fromdocname, builder, 16 | typ, target, node, contnode): 17 | res = super(CustomStandardDomain, self).resolve_xref(env, fromdocname, builder, 18 | typ, target, node, contnode) 19 | 20 | if res is None: 21 | return res 22 | 23 | if typ == 'ref' and not node['refexplicit']: 24 | docname, labelid, sectname = self.data['labels'].get(target, ('','','')) 25 | res['refdocname'] = docname 26 | 27 | return res 28 | 29 | def doctree_resolved(app, doctree, docname): 30 | secnums = app.builder.env.toc_secnumbers 31 | for node in doctree.traverse(nodes.reference): 32 | if 'refdocname' in node: 33 | refdocname = node['refdocname'] 34 | if refdocname in secnums: 35 | secnum = secnums[refdocname] 36 | emphnode = node.children[0] 37 | textnode = emphnode.children[0] 38 | 39 | toclist = app.builder.env.tocs[refdocname] 40 | anchorname = None 41 | for refnode in toclist.traverse(nodes.reference): 42 | if refnode.astext() == textnode.astext(): 43 | anchorname = refnode['anchorname'] 44 | if anchorname is None: 45 | continue 46 | linktext = '.'.join(map(str, secnum[anchorname])) 47 | node.replace(emphnode, nodes.Text(linktext)) 48 | 49 | def setup(app): 50 | app.override_domain(CustomStandardDomain) 51 | app.connect('doctree-resolved', doctree_resolved) -------------------------------------------------------------------------------- /17/tango_with_django_book.tmproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | documents 6 | 7 | 8 | filename 9 | index.rst 10 | 11 | 12 | filename 13 | conf.py 14 | lastUsed 15 | 2013-10-20T17:11:32Z 16 | 17 | 18 | filename 19 | chapters/ajax.rst 20 | 21 | 22 | filename 23 | chapters/bing_search.rst 24 | 25 | 26 | filename 27 | chapters/bootstrap.rst 28 | 29 | 30 | filename 31 | chapters/cookie.rst 32 | lastUsed 33 | 2013-10-17T16:07:45Z 34 | 35 | 36 | filename 37 | chapters/css_intro.rst 38 | 39 | 40 | filename 41 | chapters/css.rst.out 42 | 43 | 44 | filename 45 | chapters/deploy.rst 46 | 47 | 48 | filename 49 | chapters/forms.rst 50 | lastUsed 51 | 2013-10-22T16:14:30Z 52 | 53 | 54 | filename 55 | chapters/game.rst.out 56 | 57 | 58 | filename 59 | chapters/git.rst 60 | 61 | 62 | filename 63 | chapters/javascript.rst 64 | 65 | 66 | filename 67 | chapters/login.rst 68 | lastUsed 69 | 2013-10-22T15:00:23Z 70 | 71 | 72 | filename 73 | chapters/models_templates.rst 74 | lastUsed 75 | 2013-10-22T14:26:12Z 76 | 77 | 78 | filename 79 | chapters/models.rst 80 | lastUsed 81 | 2013-10-17T16:58:33Z 82 | 83 | 84 | filename 85 | chapters/outtakes.rst.out 86 | 87 | 88 | filename 89 | chapters/overview.rst 90 | 91 | 92 | filename 93 | chapters/requirements.rst 94 | lastUsed 95 | 2013-10-24T13:28:40Z 96 | selected 97 | 98 | 99 | 100 | filename 101 | chapters/setup.rst 102 | 103 | 104 | filename 105 | chapters/summary.rst 106 | 107 | 108 | filename 109 | chapters/tango_too.rst 110 | 111 | 112 | filename 113 | chapters/tango.rst 114 | 115 | 116 | filename 117 | chapters/templates_static.rst 118 | 119 | 120 | filename 121 | chapters/templates.rst 122 | 123 | 124 | filename 125 | chapters/test.rst 126 | 127 | 128 | filename 129 | TODO.md 130 | lastUsed 131 | 2013-10-17T16:58:33Z 132 | 133 | 134 | fileHierarchyDrawerWidth 135 | 200 136 | metaData 137 | 138 | showFileHierarchyDrawer 139 | 140 | windowFrame 141 | {{217, 0}, {1063, 778}} 142 | 143 | 144 | -------------------------------------------------------------------------------- /17/templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {%- block extrahead %} 4 | 19 | 31 | {% endblock %} 32 | 33 | {%- macro relbar_custom() %} 34 | 55 | 56 | 57 | 58 | {%- endmacro %} 59 | 60 | {% block relbar1 %}{{ relbar_custom() }}{% endblock %} 61 | {% block relbar2 %}{{ relbar_custom() }}{% endblock %} 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The Tango with Django Book Repository 2 | 3 | Русская версия находится в отдельной ветке [17rus](https://github.com/MaksimDzhangirov/tango_with_django_book/tree/17rus). 4 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | Upgrade to 1.7.1 2 | ---------------- 3 | 4 | - chapter overview DONE 5 | - chapter requirements DONE 6 | - chapter setup DONE: some TODOs, on migrate command 7 | - chapter templates_static DONE: some TODOs 8 | - chapter models - DONE: some TODOs 9 | - chapter models_templates DONE: some TODOs 10 | - chapter forms DONE: some TODOs 11 | - chapter login DONE: some TODOs. Really want to add in another chapter on using the django-registration-redux package 12 | - chapter templates DONE: some TODOs 13 | - chapter cookie 14 | - chapter bootstrap 15 | - chapter bing_search 16 | - chapter tango 17 | - chapter tango_too 18 | - chapter ajax 19 | - chapter deploy 20 | - chapter summary 21 | - chapter git 22 | - chapter css_intro 23 | - chapter javascript 24 | - chapter test 25 | - chapter acknowledgements 26 | 27 | 28 | 29 | General Comments 30 | ---------------- 31 | - @Siecje thinks we should start using render() rather than render_to_response() at some point. 32 | - He feels it is important to discuss that there's a shorthand way of getting a response to the client. 33 | - But I (David) argue it could be confusing - and anyway, render_to_response() drills the concept of context dictionaries into a reader's head. 34 | http://rayed.com/wordpress/?p=1445 35 | - Hmm... I can add a note at some point to discuss this briefly! 36 | 37 | EBook and Cover Design 38 | ---------------------- 39 | - Update sphinx style to compile nicely into ebook 40 | - Get a funky looking coverdesign 41 | - Create a free downloadable ebook and pdf of Tango with Django 42 | 43 | 44 | 45 | Chapter 1 46 | --------- 47 | - fix erd diagram 48 | 49 | Chapter 2 50 | --------- 51 | - setup Ubuntu 13.4 and try work through and replicate his problems ( pointed out by Mike Gleen 52 | ). 53 | - pythonbrew is now deprecated, consider pyenv for linux python installation (@k4rtik) 54 | 55 | 56 | Chapter 4 57 | --------- 58 | - add some notes about the use of python manage.py collectstatic, perhaps this would be better in the deployment chapter. (@TMurhpyMusic) 59 | 60 | 61 | Chapter 5 62 | --------- 63 | 64 | - by @ramdog and @jonathan-s - should we look at an additional chapter at the end (or section) detailing how to setup up Postgres instead of SQLite? It shouldn't take very long... 65 | - by @jonathan-s - look at South for database handling? Or is this out of scope? Django 1.7 takes care of this. DONE 66 | 67 | Chapter 7 68 | --------- 69 | 70 | - Courtesy of Can Obanoglu - In 7.2.1, we start a paragraph with "Besides the CharField and IntegerField widget, many more are available for use." It would be a good idea to add some more fields to our models that use something OTHER than the trivial IntegerField. So maybe we could add a DatePicker or something to specify when an instance was created or something? A good idea! 71 | 72 | Chapter 11 73 | --------- 74 | 75 | - Update to the latest Bootstrap (3.0.3) version as Bootstrap 2.3.2 is no longer officially supported (@rnevius) 76 | 77 | - Use Google's CDN for jQuery, instead of downloading. This is a good habit to get into. See this useful discussion on stackoverflow: http://stackoverflow.com/a/2180401 78 | 79 | - Add a note to discuss the problem of forgetting to add a slash to the end of a URL. 80 | 81 | Deployment Chapter 82 | ------------------ 83 | - add list of packages to be installed other than Django and pil 84 | 85 | Courtesy of pywebdesign 86 | - What about refactoring to use class-based views? 87 | - Adding a chapter to show how django-allauth could be used to integrate signups. 88 | 89 | CLASS-BASED VIEWS (@pywebdesign) 90 | ................................ 91 | Function based views are very useful and adequate for many other uses which means that an optimal tutorial should cover them too. I find myself looking at your code in views.py and trying to think of a solution to teach class based views without eclipsing function based view! Here's my shortly tough solution: 92 | 93 | Make an optional chapter where you teach to convert some views to class based one? This seams to be great and can also allow you to discuss the topic of class based VS function based views. Maybe you will run in some compatibility problem tough, if someone can't follow the tutorial after doing this conversion. The optional chapter should then be made to be read at the end. 94 | 95 | With this, your tutorial could become a cornerstone to learning django, I think. 96 | 97 | about allauth: here's 2 interesting tutorial: 98 | http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/ 99 | https://speakerdeck.com/tedtieken/signing-up-and-signing-in-users-in-django-with-django-allauth 100 | 101 | 102 | 103 | Advanced ORM Chapter 104 | -------------------- 105 | - Add a chapter on how to use the object relational mapping in Django.(@kracetheking @k4rtik) 106 | 107 | 108 | 109 | 110 | 111 | --------------------------------------------------------------------------------