A multipurpose company website made with Python Django.
Previews |
---|
Homepage |
Admin panel |
-
Python 3.11 or higher
-
PostgreSQL
-
smtp4dev
-
Git Bash (Optional)
Open cmd
or bash
in the project directory.
Install Python virtual environment
pip install virtualenv
Create a virtual environment
virtualenv env_name
Activate virtual environment
On Mac
and Linux
(Also if you are using bash
on Windows
)
source env_name/bin/activate
On Windows
(If you are using cmd
)
.\env_name\Scripts\activate
Install dependencies
pip install -r requirements.txt
At first create a new PostgreSQL
database.
Configure database in settings.py
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "YOUR_DATABASE_NAME",
"USER": "DATABASE_USER",
"PASSWORD": "DATABASE_PASSWORD",
"HOST": "localhost",
"PORT": "5432",
}
}
Migrate database
python manage.py makemigrations && python manage.py migrate
Create an admin user
python manage.py createsuperuser
Run the Django
server
python manage.py runserver
You can access the website at http://127.0.0.1:8000/ and the admin panel at http://127.0.0.1:8000/admin