<divstyle="padding: 0 0 20px 0; margin: 0 0 20px 0; background-color: #22B24C;">
<divclass="container">
<pclass="banner"><ahref="https://www.gumroad.com/l/python-deployments" style="color: #fff">Learning web development? Check out The Full Stack Python Guide to Deployments book</a>!</p>
</div>
</div><ahref="https://github.com/makaimc/fullstackpython.com"><imgstyle="position: absolute; top: 0; right: 0; border: 0;" src="/img/fork.png" alt="Fork me on GitHub"></a>
<p>I highly recommend the Django framework as a starting place for new Python web
developers because the official documentation and tutorials are some of the
best anywhere in software development. Many cities also have Django-specific
groups such as <ahref="http://www.meetup.com/django-district/">Django District</a>,
<ahref="http://www.meetup.com/djangoboston/">Django Boston</a> and
<ahref="http://www.meetup.com/The-San-Francisco-Django-Meetup-Group/">San Francisco Django</a>
so new developers can get help when they are stuck.</p>
<p>There's some debate on whether
<ahref="http://www.jeffknupp.com/blog/2012/12/11/learning-python-via-django-considered-harmful/">learning Python by using Django is a bad idea</a>.
However, that criticism is invalid if you take the time to learn the Python
syntax and language semantics first before diving into web development.</p>
<divclass="well see-also">While you're learning about Django you should also read up on <ahref="/web-frameworks.html">web frameworks</a> and check out the <ahref="/bottle.html">Bottle framework</a>.</div>
<h2>Django books and tutorials</h2>
<p>There are a slew of free or low cost resources out there for Django. Since
Django was released over 10 years ago and has had a huge number of updates
since then, when you're looking for an up-to-date Django book check out the
list below or read this post showing <ahref="http://twoscoopspress.org/pages/current-django-books">current Django books</a>
as of Django 1.7.</p>
<ul>
<li>
<p><ahref="http://www.obeythetestinggoat.com/">Test-Driven Development with Python</a>
focuses on web development using Django and JavaScript. This book uses
the development of a website using the Django web framework as a real
world example of how to perform test-driven development (TDD). There is
also coverage of NoSQL, websockets and asynchronous responses. The book can
be read online for free or purchased in hard copy via O'Reilly.</p>
</li>
<li>
<p><ahref="http://www.tangowithdjango.com/book17/">Tango with Django</a> is an extensive
set of free introductions to using the most popular Python web framework.
Several current developers said this book really helped them get over the
initial framework learning curve. It's recently been updated for Django 1.7!</p>
has several nice examples for breaking Django into smaller simpler
components.</p>
</li>
<li>
<p>The <ahref="https://github.com/rogueleaderr/definitive_guide_to_django_deployment">Definitive Guide to Django Deployment</a>
explains the architecture of the resulting set up and includes Chef scripts
to automate the deployment.</p>
</li>
<li>
<p><ahref="http://agiliq.com/blog/2014/08/deploying-a-django-app-on-amazon-ec2-instance/">Deploying a Django app on Amazon EC2 instance</a>
is a detailed walkthrough for deploying an example Django app to Amazon
Web Services.</p>
</li>
<li>
<p>This <ahref="http://aliteralmind.wordpress.com/2014/09/21/jquery_django_tutorial/">step-by-step guide for Django</a>
shows how to transmit data via AJAX with JQuery.</p>
</li>
<li>
<p><ahref="https://github.com/rosarior/awesome-django">django-awesome</a> is a curated
list of Django libraries and resources.</p>
</li>
<li>
<p><ahref="https://realpython.com/learn/start-django/">Starting a Django Project</a>
answers the question, “How do I set up a Django (1.5, 1.6, or 1.7) project
from scratch?”</p>
</li>
<li>
<p>This Django tutorial shows how to
<ahref="http://drksephy.github.io/2015/07/16/django/">build a project from scratch using Twitter Bootstrap, Bower, Requests and the Github API</a>.</p>
is helpful for developers new to Django to understand how to structure
the directories and files within apps for projects.</p>
</li>
<li>
<p>This <ahref="https://github.com/davisfreeman1015/SocialAuthDjangoTutorial">Python Social Auth for Django tutorial</a>
will show you how to integrate social media sign in buttons into your Django
application.</p>
</li>
<li>
<p>Luke Plant writes about
<ahref="http://lukeplant.me.uk/blog/posts/my-approach-to-class-based-views/">his approach to class based views</a> (CBVs),
which often provoke heated debate in the Django community for whether they
are a time saver or "too much magic" for the framework.</p>
</li>
<li>
<p><ahref="https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-14-04">How to serve Django apps with uWSGI and Nginx on 14.04</a>
and
<ahref="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-centos-7">how to set up Django with PostgreSQL, Nginx and Gunicorn</a>
are detailed tutorials that walk through each step in the deployment process.</p>
</li>
<li>
<p>Working with time zones is necessary for every web application. This
<ahref="http://tommikaikkonen.github.io/timezones/">blog post on pytz and Django</a> is a
great start for figuring out what you need to know.</p>
</li>
</ul>
<h2>Django videos</h2>
<p>Are you looking for Django videos in addition to articles? There is a special section
for Django and web development on the <ahref="/best-python-videos.html">best Python videos</a> page.</p>
<p>Channels are a new mechanism in Django 1.9 (as a standalone app, later
for incorporation into the core framework) for real-time full-duplex
communication between the browser and the server based on
<ahref="/websockets.html">WebSockets</a>. This
<ahref="https://blog.heroku.com/archives/2016/3/17/in_deep_with_django_channels_the_future_of_real_time_apps_in_django">tutorial shows how to get started with Django Channels in your project</a>.</p>
</li>
<li>
<p><ahref="http://pankrat.github.io/2015/django-migrations-without-downtimes/">Django migrations without downtimes</a>
shows one potential way of performing on-line schema migrations with
Django.</p>
</li>
</ul>
<h2>Django testing</h2>
<ul>
<li>
<p><ahref="https://lincolnloop.com/blog/integrating-front-end-tools-your-django-project/">Integrating Front End Tools with Django</a>
is a good post to read for figuring out how to use <ahref="http://gulpjs.com/">Gulp</a>
for handling front end tools in development and production Django sites.</p>
</li>
<li>
<p><ahref="http://howchoo.com/g/mjkwmtu5zdl/getting-started-with-django-testing">Getting Started with Django Testing</a>
will help you stop procrastinating on testing your Django projects if you're
uncertain where to begin.</p>
</li>
<li>
<p><ahref="https://realpython.com/blog/python/testing-in-django-part-1-best-practices-and-examples/">Testing in Django</a>
provides numerous examples and explanations for how to test your Django
project's code.</p>
</li>
<li>
<p><ahref="https://medium.com/@unary/django-views-automated-testing-with-selenium-d9df95bdc926">Django views automated testing with Selenium</a>
gives some example code to get up and running with
<h2>Django with Angular (Djangular) resources</h2>
<ul>
<li>
<p><ahref="http://blog.kevinastone.com/getting-started-with-django-rest-framework-and-angularjs.html">Getting Started with Django Rest Framework and AngularJS</a>
is a very detailed introduction to Djangular with example code. </p>
</li>
<li>
<p><ahref="https://thinkster.io/brewer/angular-django-tutorial/">Building Web Applications with Django and AngularJS</a>
is a very detailed guide for using Django as an API layer and AngularJS
as the MVC front end in the browser.</p>
</li>
<li>
<p>This <ahref="http://mourafiq.com/2013/07/01/end-to-end-web-app-with-django-angular-1.html">end to end web app with Django-Rest-Framework & AngularJS part 1</a>
that includes a section specifically for the Django ORM as well as additional
resources and tutorials.</p>
<h2>Static and media files</h2>
<p>Deploying and handling static and media files can be confusing for new
Django developers. These resources along with the
<ahref="/static-content.html">static content</a> page are useful for figuring out how
to handle these files properly.</p>
<ul>
<li>
<p><ahref="http://www.caktusgroup.com/blog/2014/11/10/Using-Amazon-S3-to-store-your-Django-sites-static-and-media-files/">Using Amazon S3 to Store your Django Site's Static and Media Files</a>
is a well written guide to a question commonly asked about static and
media file serving.</p>
</li>
<li>
<p><ahref="http://www.revsys.com/blog/2014/dec/03/loading-django-files-from-code/">Loading Django FileField and ImageFields from the file system</a>
shows how to load a model field with a file from the file system.</p>
</li>
<li>
<p><ahref="http://blog.wearefarm.com/2015/02/09/contact-form-uploads/">Restricting access to user-uploaded files in Django</a>
provides a protection mechanism for media files.</p>
</li>
</ul>
<h2>Open source Django example projects</h2>
<ul>
<li>
<p><ahref="https://www.twilio.com/docs/howto/walkthrough/browser-calls/python/django">Browser calls with Django and Twilio</a>
shows how to build a web app with Django and
<ahref="https://www.twilio.com/client">Twilio Client</a> to turn a user's web
browser into a full-fledged phone. Pretty awesome!</p>
</li>
<li>
<p><ahref="https://github.com/makaimc/txt2react">Txt 2 React</a> is a full Django web
app that allows audiences to text in during a presentation with feedback
or questions.</p>
</li>
<li>
<p><ahref="https://github.com/ustream/openduty">Openduty</a> is a website status checking
and alert system similar to PagerDuty.</p>
</li>
<li>
<p><ahref="https://github.com/myusuf3/courtside">Courtside</a> is a pick up sports web
application written and maintained by the author of PyCoder's Weekly.</p>
</li>
<li>
<p>These two Django Interactive Voice Response (IVR) system web application
repositories <ahref="https://github.com/phalt/twilio-django-part-1">part 1</a> and
<ahref="https://github.com/phalt/twilio-django-part-2">part 2</a> show you how to
build a really cool Django application. There's also an accompanying
<pstyle="font-size: .8em;">If you're searching for step-by-step Django
tutorials then I highly recommend
<ahref="https://realpython.com/?utm_source=fsp&utm_medium=promo&utm_campaign=django" onclick="trackOutboundLink('https://realpython.com/?utm_source=fsp&utm_medium=promo&utm_campaign=django'); return false;">checking out Real Python</a>.