-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
236a520
commit 81c5c4e
Showing
2 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,72 @@ | ||
# teknologr.io [![Build Status](https://travis-ci.org/Teknologforeningen/teknologr.io.svg?branch=develop)](https://travis-ci.org/Teknologforeningen/teknologr.io) [![Coverage Status](https://coveralls.io/repos/github/Teknologforeningen/teknologr.io/badge.svg?branch=develop)](https://coveralls.io/github/Teknologforeningen/teknologr.io?branch=develop) | ||
Membership management system tailored for TF use | ||
Membership teknologr/management system tailored for TF use | ||
|
||
## Installation | ||
|
||
Install prerequisites: | ||
Clone the repository, go into the root directory of the project and do the following: | ||
|
||
1. Install prerequisites | ||
``` | ||
sudo apt install libsasl2-dev python3-dev libldap2-dev libssl-dev libpq-dev | ||
pip install virtualenv | ||
``` | ||
Make sure that you have Python 3 installed and virtualenv to go with it. | ||
1. Create a virtual environment | ||
``` | ||
virtualenv -p /usr/bin/python3 venv | ||
``` | ||
1. Create virtualenv: `virtualenv -p /usr/bin/python3 venv` | ||
2. Activate venv: `source venv/bin/activate` | ||
3. Install stuff with pip: `pip install -r requirements.txt` | ||
1. Activate said virtual enviroment. **You need to do this for every new session.** | ||
``` | ||
source venv/bin/activate | ||
``` | ||
## Code style | ||
pep8 check will be done when doing `python manage.py test`. | ||
Linting only can be run with `python manage.py test test_pep8`. | ||
1. Install prerequisites with pip | ||
``` | ||
pip install -r requirements.txt | ||
``` | ||
1. Create a .env file | ||
``` | ||
cp teknologr/.env.example teknologr/.env | ||
``` | ||
During development you probably want to set `DEBUG=True`, and you might need to at least change the database location too to get it work out of the box. I suggest you remove the `DATABASE=...` completely to use the default database path (`teknologr/db.sqlite3`). | ||
1. Make sure you have the correct locale available on your system. The default locale used by Teknologr.io is `sv_FI.utf8`. | ||
``` | ||
sudo locale-gen sv_FI.utf8 | ||
sudo update-locale | ||
``` | ||
1. Run migrations to update the database schema | ||
``` | ||
python teknologr/manage.py migrate | ||
``` | ||
1. Create a new superuser account | ||
``` | ||
python teknologr/manage.py createsuperuser | ||
``` | ||
1. You are now ready to run an instance of Teknologr.io | ||
``` | ||
python teknologr/manage.py runserver | ||
``` | ||
View the page in your browser at `http://localhost:8000`. The admin site can be found at `http://localhost:8000/admin`. | ||
## Tests | ||
There is a number of unittests in files named `tests_*.py`. To run all the tests: | ||
``` | ||
python teknologr/manage.py test | ||
``` | ||
To run only a specific test: | ||
``` | ||
python teknologr/manage.py test members.tests_models.GroupTest | ||
``` | ||
A certain code style is required. Run the PEP8 test to check the style: | ||
``` | ||
python teknologr/manage.py test teknologr.tests_pep8 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters