- Create A python virtual enviroment
py -3 -m venv venv
- Activate Python virtual environment
source ./venv/bin/activate
- Install MariaDB
# Arch Linux
yay -S mariadb mariadb-libs
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
# OpenSUSE
sudo zypper install libmariadb-devel
# ALL
sudo systemctl start mariadb
sudo mysql_secure_installation
y, y, <password>, y, y, y, y
- Initialize database
mysql -u root -p
- Init test database
mysql -u root -p
source ./init_db.sql
- Install Python dependencies
pip install -r requirements
- Copy settings.template into settings.py
cp mysite/settings.template.py mysite/settings.py
-
Configure settings.template
-
Run
python manage.py migrate
Django has a system for migrations to prevent loads of changes, both in the db and backend. This command fixes up the database according to the model in the backend.
- Run
python manage.py createsuperuser
This creates an administrator account which is required for creating any sort of content for the CMS.
- Run `python manage.py runserver'
This should start the server and give a reference to hat port is is running on.
- switch from MySQL to MariaDB (community-developed fork, read Google)
- upgraded from Django 2 to Django 3
- CMS Plugins have a render method which does not do anything
- use os.path.join
- keep database schema inside of git repository
- remove all referenes of mysite and call it digitalcosmos