Book Image

Django Project Blueprints

By : Asad Jibran Ahmed
Book Image

Django Project Blueprints

By: Asad Jibran Ahmed

Overview of this book

Django is a high-level web framework that eases the creation of complex, database-driven websites. It emphasizes on the reusability and pluggability of components, rapid development, and the principle of don't repeat yourself. It lets you build high-performing, elegant web applications quickly. There are several Django tutorials available online, which take as many shortcuts as possible, but leave you wondering how you can adapt them to your own needs. This guide takes the opposite approach by demonstrating how to work around common problems and client requests, without skipping the important details. If you have built a few Django projects and are on the lookout for a guide to get you past the basics and to solve modern development tasks, this is your book. Seven unique projects will take you through the development process from scratch, leaving no stone unturned. In the first two projects, you will learn everything from adding ranking and voting capabilities to your App to building a multiuser blog platform with a unique twist. The third project tackles APIs with Django and walks us through building a Nagios-inspired infrastructure monitoring system. And that is just the start! The other projects deal with customizing the Django admin to create a CMS for your clients, translating your web applications to multiple languages, and using the Elasticsearch search server with Django to create a high performing e-commerce web site. The seventh chapter includes a surprise usage of Django, and we dive deep into the internals of Django to create something exciting! When you're done, you'll have consistent patterns and techniques that you can build on for many projects to come.
Table of Contents (15 chapters)
Django Project Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Chapter 1. Blueblog – a Blogging Platform

We are going to start with a simple blogging platform in Django. In recent years, Django has emerged as one of the clear leaders in web frameworks. When most people decide to start using a web framework, their searches lead them to either Ruby on Rails (RoR) or Django. Both are mature, stable, and extensively used. It appears that the decision to use one or the other depends mostly on which programming language you're familiar with. Rubyists go with RoR, Pythonistas go with Django. In terms of features, both can be used to achieve the same results, although they have different approaches to how things are done.

One of the most popular blogging platforms these days is Medium, widely used by a number of high profile bloggers. Its popularity stems from its elegant theme, and simple-to-use interface. I'll walk you through creating a similar application in Django, with a few surprise features that most blogging platforms don't have. This will give you a taste of things to come, and show you just how versatile Django can be.

Before starting any software development project, it's a good idea to have a rough roadmap of what we would like to achieve. Here's a list of features that our blogging platform will have:

  • User should be able to register an account and create their blogs

  • Users should be able to tweak the settings of their blogs

  • There should be simple interface for users to create and edit blog posts

  • Users should be able to share their blog posts on other blogs on the platform

I know this seems like a lot of work, but Django comes with a couple of contrib packages that speed up our work considerably.