Simple introduction to Django and Bootstrap. This website allows many users to manage and compare their music collections.
You can think of recordshelf/
as the website and records/
as the application that makes it tick.
This folder contains the main application logic. It's structured in the Django Model-View-Controller pattern. The initial app was generated with ./manage.py startapp
. Then the app was added to INSTALLED_APPS
.
Django project related files, useful when deploying the server in various environments. These files were generated as a part of the project by django-admin
.
Django command line utility. Very useful. This file was generated as a part of the project by django-admin
.
You'll need a recent version of Python 3 installed. Install Django:
python -m pip install django
And then verify that the installation was successfull:
python -m django --version
Initialize the local file-backed sqlite-database, this means you don't have to spin up MariaDB or another database for development.
python ./manage.py migrate
This creates a local file ./db.sqlite3
.
Create your first user. This user will have permissions to create more users in the /admin
-pages.
python ./manage.py createsuperuser
python ./manage.py runserver
The development server is now listening on http://localhost:8000.
Migrations will be generated based on your changes to ../models.py
. Please note that the code in ../migrations/
is managed by this command, and you don't necessarily have to understand it.
python ./manage.py makemigrations
You'll need to also migrate the changes to your development server.
python ./manage.py migrate
Distributed under the MIT License.