Learning Django Web Development

From idea to prototype, a learner's guide for web development with the Django application framework

Learning Django Web Development

This ebook is included in a Mapt subscription
Sanjeev Jaiswal, Ratan Kumar

1 customer reviews
From idea to prototype, a learner's guide for web development with the Django application framework
$0.00
$18.00
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783984404
Paperback336 pages

Book Description

Django, written in Python, is a web application framework designed to build complex web applications quickly without any hassle. It loosely follows the MVC pattern and adheres to the Don't Repeat Yourself principle, which makes a database-driven application efficient and highly scalable, and is by far the most popular and mature Python web framework.

This book is a manual that will help you build a simple yet effective Django web application. It starts by introducing Django, setting it up, and shows you how to code simple programs. You will then learn to build your first Twitter-like app. Later on, you will be introduced to Hashtags, AJAX to enhance the user interface, and tweets. You will then move on to create an administration interface, learn database connectivity, and use third-party libraries. Then you will learn to debug and deploy Django projects, and also get a glimpse of Django with AngularJS and Elasticsearch. By the end of the book, you will be able to leverage the Django framework to develop a fully functional web application with minimal effort.

Table of Contents

Chapter 1: Introduction to Django
Why web development in the first place?
What has changed in web development
The MVC pattern in web development
Why Django?
Supported databases
What you will learn using this book
Summary
Chapter 2: Getting Started
Installing the required software
Creating your first project
Summary
Chapter 3: Code Style in Django
Django coding style
Using IDE for faster development
Setting up your project with the Sublime text editor
Setting up the PyCharm IDE
The Django project structure
Best practices – using version control
Setting up the database
Launching the development server
Faster web development
Summary
Chapter 4: Building an Application Like Twitter
A word about Django terminology
Setting up a basic template application
Installing Django
Setting up the basic Twitter Bootstrap for the application
URLs and views – creating the main page
Introduction to class-based views
Django settings for the mytweets project
Putting it all together – generating user pages
Models – designing an initial database schema
Summary
Chapter 5: Introducing Hashtags
The hashtag data model
Designing the tweet post form
Creating a tag page
Summary
Chapter 6: Enhancing the User Interface with AJAX
AJAX and its advantages
Using an AJAX framework in Django
Using the open source jQuery framework
Implementing the searching of tweets
Implementing the live searching of tweets
Editing a tweet in place without loading a separate page
Autocompletion of hashtags while submitting a tweet
Summary
Chapter 7: Following and Commenting
Letting users follow another user
Displaying the most followed user
Summary
Chapter 8: Creating an Administration Interface
Customizing the administration interface
Customizing listing pages
Overriding administration templates
Users, groups, and permissions
Organizing content into pages – pagination
Summary
Chapter 9: Extending and Deploying
Sending invitation e-mails to friends
Internationalization (i18n) – offering the site in multiple languages
Caching – improving the performance of your site during high traffic
Unit testing – automating the process of testing your application
Deploying Django
Summary
Chapter 10: Extending Django
Custom template tags and filters
Class-based generic views
Contributed sub-frameworks
Flatpages
The message system
The subscription system
User scores
Summary
Chapter 11: Database Connectivity
SQL versus NoSQL
Setting up a database system
The single-page application project – URL shortener
Summary
Chapter 12: Using Third-party Packages
Diving into the world of open source
Using SocialAuth in Django projects
Building REST APIs in Django
Summary
Chapter 13: The Art of Debugging
Logging
Debugging
IPDB – interactive way of busting bugs
Summary
Chapter 14: Deploying Django Projects
The production web server
The production database
Turning off the debug mode
Changing configuration variables
Setting error pages
Django on cloud
Summary
Chapter 15: What's Next?
AngularJS meets Django
Django search with Elasticsearch
Summary

What You Will Learn

  • Build Django web application right from scratch
  • Use version control to manage the development project
  • Learn to use Django with both SQL and NoSQL databases
  • Build faster and more efficient webpages using a frontend framework Twitter Bootstrap
  • Improve web application performance with caching
  • Enhance your user interface with AJAX and add flavors to your website
  • Deploy the Django web application to clouds such as AWS, Heroku, and OpenShift
  • Get familiar with AngularJS and Elasticsearch for Django

Authors

Table of Contents

Chapter 1: Introduction to Django
Why web development in the first place?
What has changed in web development
The MVC pattern in web development
Why Django?
Supported databases
What you will learn using this book
Summary
Chapter 2: Getting Started
Installing the required software
Creating your first project
Summary
Chapter 3: Code Style in Django
Django coding style
Using IDE for faster development
Setting up your project with the Sublime text editor
Setting up the PyCharm IDE
The Django project structure
Best practices – using version control
Setting up the database
Launching the development server
Faster web development
Summary
Chapter 4: Building an Application Like Twitter
A word about Django terminology
Setting up a basic template application
Installing Django
Setting up the basic Twitter Bootstrap for the application
URLs and views – creating the main page
Introduction to class-based views
Django settings for the mytweets project
Putting it all together – generating user pages
Models – designing an initial database schema
Summary
Chapter 5: Introducing Hashtags
The hashtag data model
Designing the tweet post form
Creating a tag page
Summary
Chapter 6: Enhancing the User Interface with AJAX
AJAX and its advantages
Using an AJAX framework in Django
Using the open source jQuery framework
Implementing the searching of tweets
Implementing the live searching of tweets
Editing a tweet in place without loading a separate page
Autocompletion of hashtags while submitting a tweet
Summary
Chapter 7: Following and Commenting
Letting users follow another user
Displaying the most followed user
Summary
Chapter 8: Creating an Administration Interface
Customizing the administration interface
Customizing listing pages
Overriding administration templates
Users, groups, and permissions
Organizing content into pages – pagination
Summary
Chapter 9: Extending and Deploying
Sending invitation e-mails to friends
Internationalization (i18n) – offering the site in multiple languages
Caching – improving the performance of your site during high traffic
Unit testing – automating the process of testing your application
Deploying Django
Summary
Chapter 10: Extending Django
Custom template tags and filters
Class-based generic views
Contributed sub-frameworks
Flatpages
The message system
The subscription system
User scores
Summary
Chapter 11: Database Connectivity
SQL versus NoSQL
Setting up a database system
The single-page application project – URL shortener
Summary
Chapter 12: Using Third-party Packages
Diving into the world of open source
Using SocialAuth in Django projects
Building REST APIs in Django
Summary
Chapter 13: The Art of Debugging
Logging
Debugging
IPDB – interactive way of busting bugs
Summary
Chapter 14: Deploying Django Projects
The production web server
The production database
Turning off the debug mode
Changing configuration variables
Setting error pages
Django on cloud
Summary
Chapter 15: What's Next?
AngularJS meets Django
Django search with Elasticsearch
Summary

Book Details

ISBN 139781783984404
Paperback336 pages
Read More
From 1 reviews

Read More Reviews