Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

NTNUI/events-bachelor-v18

Repository files navigation

Description

Internal system for members and volunteers in NTNUI.

Installation

make build

How to run

make start

Docker

Run the project using docker:

To start the project using docker run the following command:

docker-compose up web

To make migrations you may use:

docker-compose run web python manage.py makemigrations

To apply the migratations use:

docker-compose run web python manage.py migrate

Running the project using a virtual environment

Setup

first you need to set up a viritual enviorment. (more to come)

Running the project

make sure you are in your viritual enviorment!

To start the project

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.

To make migrations you may use:

python manage.py makemigrations

To applay the migratations use:

python manage.py migrate

Browser testing

Requirements for testing with visual browser:

Language files

gettext

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)

Update or create a language

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.

Compile messages

After you have made the translations, you can compile them using the following command.

python manage.py compilemessages