This project is developed using Django and include a basic functionality of saving input data within forms and styling it using django-crispy-forms
- Create a new Python environment
python -m venv env
- Activate Python environment
source env/Scripts/activate
- Install Django
pip install django
pip install django-crispy-forms
pip install crispy-tailwind
- Create the project (skip this if cloning from git, only run the first time setting up the project)
django-admin startproject config .
- Run the server
python manage.py runserver
- Create app and models
python manage.py startapp links
-
Add app
links
by editingINSTALLED_APPS
inconfig/settings.py
-
Create model by editing
/links/models.py
-
Migrate the model to database
python manage.py makemigrations
python manage.py migrate
-
Register a new admin user by editing
/links/admin.py
-
Create a admin user
python manage.py createsuperuser
-
Add data using admin page
http://127.0.0.1:8000/admin
-
Create
/links/templates/links/index.html
-
Set url by creating
/links/urls.py
and editing/config/urls.py
and/links/views.py