I finally got the time to write a Django tutorial. In this tutorial we are building URL Shortener. If you are confused with what we are building then we are building something similar to (bit.ly) or (goo.gl).
We are building the app that will make a shorter URL of a longer URL. (Example) Normally the shorter URL will be localhost:8000/4hh5kr for http://www.facebook.com
I am using Django 1.7.1 with Python 3.3.2+. Don’t worry if you have different version of Django because we will set up our virtual environment and install latest version of Django. But be sure you do have Python 3+ because installing Python will not be covered in this tutorial.
I assume that you have completed Writing your first Django app. It is not really essential to complete this tutorial but it is highly recommended that you complete this tutorial before we begin. It will give you a lot of knowledge that will be useful in this tutorial.
You can also get the source code of this app in Github(django_urlshortener).
This tutorial is divided into 5 parts:
- Part 1, Create a virtual environment and install Django
- Part 2, Create a new project and make sure it works
- Part 3, Create Django App, Model for our App and work with Django Admin
- Part 4, Working with URLs and Views
- Part 5, Working on Templates, Static files and finishing up