A demo project
Let us create a small django project to uderstand how URL shortening work. You may fork my project url-shortener from the GitHub.
After forking the above repo, change the log path in shorturl/settings.py and run the application by typing the following command
python manage.py runserver
This will create the shorturl/db.sqlite3 file. After this run the DB migrations to create the required tables by using the following command.
python manage.py migrate