Skip to content

Piwero/web1_django

Repository files navigation

web1_django

One of the first project demos I did with Django. (I felt proud, and now ashamed of this XD) I was about to deprecate this project, but it's always worth to keep it here as a reference.

https://piwero-django1.herokuapp.com

web project for a company with a blog, contact form, services catalogue and shop.

Getting started:

Create and activate virtualenv

virtualenv .venv -p python3
. .venv/bin/activate

or python3 -m virtualenv .venv

Install requirements

pip install Poetry
poetry install

Create basic local settings

touch backend/core/settings/local.py

local.py:

from .base import *  # noqa

DEBUG = True
ALLOWED_HOSTS = ["*"]

Secret keys

touch .env

.env:

# Django secret
SECRET_KEY = ""
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST="smtp.gmail.com"
EMAIL_USE_TLS=True
EMAIL_PORT=587
EMAIL_HOST_USER = "" # Your Gmail 
EMAIL_HOST_PASSWORD = "" # Your Gmail password

Ask someone in the team to share their .env file with you, which contains the secrets of
the project. These secrets should never be pushed to the repository!

Activate pre-commit configuration

pre-commit install

Migrate database

python manage.py migrate

Load fixtures

python manage.py loaddata fixtures

Run server

Run Web

python manage.py runserver

http://localhost:8000/

About

web project with Django

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published