First we have to create a directory which will hold you main code.
Inside that folder you will have to create your virtual environment. Once your venv is created you will have to create
django project with the following command: django-admin startproject project-name
asgi.py and wsgi.py are config files for deployment.
Lorem ipsum dolor sitamet
Once you have your project structure, you can run your server with: python manage.py runserver
.
You can also modify the project settings where you can establish some project configuration such as DEBUG, ALLOWED_HOST, INSTALLED_APPS (where you can define which apps are going to be availables inside the project manager UI), you can also define
a database (sqlite3 default as ENGINE value)
In order to create a django app you need to write the following command: python manage.py startapp app-name
Once you have your application you can add it to the INSTALLED_APPS list inside the settings.py file.
In order for our models inside our newly app to be available inside UI manager you have to register them down inside the admin.py file inside the app you are working on. You accomplish this by entering the following code.
from .models import <ModelClassTablesList>
admin.site.register(TableClassModelName)
Once you have your tables difined inside models.py you need to create your migrations with: python manage.py makemigrations
. Then you have to migrate them with: python manage.py migrate
First you have to create a superuser account. You can do this by running the next command: python manage.py createsuperuser
you will be asked for your username as well as email and password. Once your superuser created, you can enter the admin site by appending /admin to the base url. You will find a login page wher you have to enteryou super user credentials.