Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/matrix invites #488

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ django-oauth-toolkit = ">=1.5.0"
dateparser = "*"
nordigen = "*"
django-constance = {extras = ["database"], version = "*"}
typing-extensions = "*"

[requires]
# Debian stable
python_version = "3.9"
# Ubuntu 24.04
# python_version = "3.11"

[pipenv]
#
Expand Down
376 changes: 18 additions & 358 deletions Pipfile.lock

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pipenv sync --dev
pipenv shell
```

If pipenv sync fails due to wrong Python version, change it in Pipfile, delete Pipfile.lock and try again.

Create your own `drfx/settings_local.py` file with at least this to get cookies working without ssl

```
Expand All @@ -96,6 +98,12 @@ CSRF_COOKIE_NAME = '__NotReallyHost-csrf'
./manage.py runserver
```

## To create a initial superuser account

```bash
./manage.py createsuperuser
```

## To update localizations

Always start everything by opening the pipenv shell for this project first! (`pipenv shell`) or by prepending individual commands with (`pipenv run`) for system users that does not have shell access normally.
Expand Down
11 changes: 11 additions & 0 deletions drfx/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
RECEIPTREGID = "1234567-8"
RECEIPTSTREET = "Street 12, Somewhere Finland"

# Matrix integration

# Access token for user you want to use. Leave empty for no Matrix integration.
MATRIX_ACCESS_TOKEN = ""
# Matrix homeserver URL
MATRIX_SERVER = "https://matrix.hacklab.fi/"
# Room ID to invite new users. Default points to Hacklab.fi Matrix space.
MATRIX_ROOM_ID = "!yNczWCtqHFeWuTbmhB:hacklab.fi"

# External urls, like links to members guide and rules
ASSOCIATION_RULES_URL = (
Expand Down Expand Up @@ -382,6 +390,9 @@
str,
),
"GITHUB_URL": (GITHUB_URL, "Link to the github repository", str),
"MATRIX_ACCESS_TOKEN": (MATRIX_ACCESS_TOKEN, "Matrix user access token", str),
"MATRIX_SERVER": (MATRIX_SERVER, "Matrix server", str),
"MATRIX_MEMBER_ROOM_ID": (MATRIX_ROOM_ID, "Matrix room id for members", str),
# Uncomment this if you would like to be able to edit the bank account details in the admin panel
# "ACCOUNT_IBAN": (ACCOUNT_IBAN, "IBAN of the association's bank account"),
# "ACCOUNT_BIC": (ACCOUNT_BIC, "BIC of the association's bank account"),
Expand Down
15 changes: 8 additions & 7 deletions emails/locale/fi/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-01 18:23+0200\n"
"POT-Creation-Date: 2024-05-19 13:14+0000\n"
"PO-Revision-Date: 2020-09-26 14:09+0300\n"
"Last-Translator: Sami Olmari <[email protected]>\n"
"Language-Team: \n"
Expand All @@ -22,11 +22,11 @@ msgstr ""
msgid "Show browser version"
msgstr "Näytä selaimen versio"

#: emails/admin.py:46 emails/templates/admin/send-email.html:15
#: emails/admin.py:47 emails/templates/admin/send-email.html:13
msgid "Send now"
msgstr "Lähetä heti"

#: emails/admin.py:84
#: emails/admin.py:85
msgid "Send email"
msgstr "Lähetä email"

Expand Down Expand Up @@ -54,26 +54,27 @@ msgstr ""
"Sähköpostin sisältö. Kaikki viestit alkavat 'Katsele viestiä selaimessa' ja "
"loppuvat 'Sait tämän viestin koska' teksteillä"

#: emails/models.py:41
#: emails/models.py:43
msgid "Creation date"
msgstr "Luontipäivä"

#: emails/models.py:44
#: emails/models.py:48
msgid "Last modified datetime"
msgstr "Muokattu viimeksi päiväys"

#: emails/models.py:48
#: emails/models.py:52
msgid "Datetime the message was sent"
msgstr "Viestin lähetyksen päiväys"

#: emails/templates/admin/send-email.html:9
msgid "Body"
msgstr "Sisältö"

#: emails/templates/admin/send-email.html:19
#: emails/templates/admin/send-email.html:17
msgid "Cancel"
msgstr "Peruuta"

#: emails/templates/mail_content_and_post.html:5
#: emails/templates/mail_content_and_post.txt:5
#, python-format
msgid ""
Expand Down
Loading
Loading