Internal system for members and volunteers in NTNUI.
make build
make start
docker-compose up web
docker-compose run web python manage.py makemigrations
docker-compose run web python manage.py migrate
first you need to set up a viritual enviorment. (more to come)
make sure you are in your viritual enviorment!
python manage.py runserver localhost:8000
Here localhost is the url and 8000 is the port, this may be set to whatever you like, but make sure to update the settings file if you are using something als.
python manage.py makemigrations
python manage.py migrate
Install chromedriver
brew install chromedriver
C:\Windows
/usr/local/bin
Install geckodriver
brew install geckodriver
C:\Windows
/usr/local/bin
To make any changes to the language files(.po, .mo) you will first need to install gettext, it can be downloaded from the following site (gettext link)
To find out how to add translations to your view or templates, you may visit djangosdocumentation
All language files are located in the locale folder, with subfolders corresponding to the language extension(nb, nn etc)
After you have navigated to you project root directory, you can create or update languages using the following command:
python manage.py makemessages -l language_code -i env
And in order to compile Javascript you can use the following command:
python -m django-admin makemessages -d djangojs -l language_code
Where the language_code is the extension for the language you would like to use, for instance nb is norwegian bokmål.
After you have made the translations, you can compile them using the following command.
python manage.py compilemessages