Django – some frequently used commands

python-django

While working with Django you use a lot of commands. I decided to create a list of commands for myself to make my development a little faster.

Quick links to tutorials:

My project folder is this: ~/Documents/common-app-server/app_server

My project name is: tokens

Creating virtual environment:

Activating virtual environment:

Installing Django on virtual environment:

Django version:

Starting a project:

Creating Django application:

Syncing database for the first time:

Creating migrations:

Looking at migrations:

Starting migrations:

Entering sqlite mode:

Recreating database:
1. Delete migrations folder
2. Use this command to clear database:

3. Create and run migrations

Running a local server:

Creating admin user:

App view:

Admin view:

Installing DjangoRestFramework:

Leave a Reply

Your email address will not be published. Required fields are marked *