Note: Since we will be progressing with the project, we will be using the backend
folder in the root of this repository as our project folder. So, make sure you have cloned this repository in your system.
You have to create a python virtual environment for your project. You can use the venv
module to create a virtual environment. You can refer to the official documentation for more details.
venv
in the backend/
folder..gitignore
. You can check out various .gitignore
templates for Django/Python.pip install django
.You have to create a Django project. You can refer to the official documentation for more details.
mydjangoproject
for consistency.summer-of-code-2023/backend/mydjangoproject
settings.py
file.You have to create models for your app and render templates using the models. You can refer to the official documentation for more details.
Product
which will have fields like name
, description
, price
, etc.You have to add authentication to your project. You can refer to the official documentation for more details.
You have to create a form for adding products to the database. You can refer to the official documentation for more details.
backend/schema.md
and write each field and their data type etc. for each Model in table format in markdown, keeping a separate Table for each Model. Also, create a diagram for your schema using Mermaid.sqlite3
as its database for development. However, for production, you need to set up a database like MySQL or PostgreSQL. So, for the first bonus task, setup PostgreSQL on your local machine and connect it to Djangonginx
or apache
for rendering the static files like the templates and assets. So, set up a simple nginx static server, and place your static files accordingly