mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-08 07:02:20 +01:00
Marietje 4.1: Addition of Django REST framework, Swagger, Dark mode and updates to Django and Bootstrap
This commit is contained in:
36
README.md
Normal file
36
README.md
Normal file
@ -0,0 +1,36 @@
|
||||
# Marietje
|
||||
Welcome to the repository of Marietje! Marietje is the system that provides music in the South canteen of the Huygens
|
||||
building. Students of the faculty of science can request an account at the administrators and then upload and queue
|
||||
music.
|
||||
|
||||
## Getting started
|
||||
This project is built using the [Django](https://github.com/django/django) framework.
|
||||
[Poetry](https://python-poetry.org) is used for dependency management.
|
||||
|
||||
### Development setup
|
||||
1. Get at least [Python](https://www.python.org) 3.9 installed on your system.
|
||||
2. Clone this repository.
|
||||
3. If ```pip3``` is not installed on your system yet, execute ```apt install python3-pip``` on your system.
|
||||
4. Also make sure ```python3-dev``` is installed on your system, execute ```apt install python3-dev```.
|
||||
5. Install Poetry by following the steps on [their website](https://python-poetry.org/docs/#installation). Make sure
|
||||
poetry is added to ```PATH``` before continuing.
|
||||
6. Make sure `poetry` uses your python 3 installation: `poetry env use python3`.
|
||||
7. Run `poetry install` to install all dependencies.
|
||||
8. Run `poetry shell` to start a shell with the dependencies loaded. This command needs to be run every time you open a
|
||||
new shell and want to run the development server.
|
||||
9. Run ```cd marietje``` to change directories to the ```website``` folder containing the project.
|
||||
10. Change the `DATABASES` setting in `marietje/marietje/settings/settings.py` to the following:
|
||||
```
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
||||
}
|
||||
```
|
||||
11. Install [berthad](https://github.com/bertha/berthad) on your system by following the README file. berthad is used
|
||||
for storing the music files.
|
||||
12. Start a bertad service by following the berthad README file.
|
||||
13. Adjust the `BERTHA_HOST` setting in `marietje/marietje/settings/settings.py` to the host you created previously.
|
||||
14. Run ```./manage.py migrate``` to initialise the database and run all migrations.
|
||||
15. Run ```./manage.py createsuperuser``` to create an administrator that is able to access the backend interface later
|
||||
on.
|
||||
16. Run ```./manage.py runserver``` to start the development server locally.
|
||||
Reference in New Issue
Block a user