This project is a server site rendering (SSR) with django and many third party packages to complete fully understand django and building a complete project with django. This project is a version of the project offered in the book Django for Professionals Production websites with Python Django 4.0 (William Vincent) and is live coded with modifications by me Rvjonh or just Jonhπ.
The project has:
- UI in many templates
- Home Page
- About Page
- Search Filter Dor Books
- Books By User (Publisher)
- Full User Authentication Pages
- Many routes rendered in backend
- Models a CustomUsers, Book and their Reviews
- User Account management
- CRUD operations in models after metioned
- Pagination in Books Sections and Reviews Sections
- Mention Third Party Libraries:
- django-crispy-forms
- django-allauth
- For branch render-deploy-with-googledrive
Follow every command below to put it running in your machine
-
Setting Repository in your machine
git clone https://github.com/Rvjonh/django_bookstore.git # clone the repository in the actual dir py -m venv .venv # creates a python environment .venv\Scripts\activate.bat # activate the environment (Windows) pip install -r requirements.txt # install dependencies for the project (ej. django)
-
Configure your local variables (Windows)
copy .env-copy .env # Make a copy of the file You need to fill all the variables ... to put it work full correctly
-
Configure your database system
In this section you will have to create a mysql database and add it to in the file django_project/settings, and modify the DATABASES section, if you have MySQL in your computer will easy, just follow these steps: How to connect MySQL to Django
or just change the DATABASE confi to:
DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": BASE_DIR / "db.sqlite3", } }
-
Start the development server
py manage.py makemigrations py manage.py migrate py manage.py runserver
-
Visit your server website url for development (Example)
Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). December 25, 0000 - 07:00:00 Django version 4.1.5, using settings 'django_project.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.
To create a new Secreat Key for django.settings
python -c "import secrets; print(secrets.token_urlsafe())"