Skip to content

Commit

Permalink
Merge branch 'main' into generic-welcome-email
Browse files Browse the repository at this point in the history
* main:
  fix: allow user in bank transaction to be blank in forms (TampereHacklab#539)
  Korjattu assertti
  Feature/matrix invites (TampereHacklab#488)
  fix ci (TampereHacklab#533)
  Update account_deactivated_and_marked_for_deletion.txt (TampereHacklab#500)
  Bump Python version to 3.11 used in Debian 12 (TampereHacklab#523)
  • Loading branch information
braaar committed Feb 1, 2025
2 parents c8819ff + d28f57d commit 38176d1
Show file tree
Hide file tree
Showing 21 changed files with 1,834 additions and 880 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: '3.9'
python-version: '3.11'

- name: Install GNU gettext
run: sudo apt install gettext
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10
FROM python:3.11
ENV PYTHONUNBUFFERED 1
WORKDIR /code

Expand Down
46 changes: 24 additions & 22 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,48 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
pep8 = "*"
flake8 = "*"
pylint = "*"
ipython = "*"
autopep8 = "*"
black = "*"
coverage = "*"
tox = "*"
coveralls = "*"
flake8 = "*"
ipython = "*"
isort = "*"
pep8 = "*"
pylint = "*"
rope = "*"
coveralls = "*"
black = "*"
tox = "*"
werkzeug = "*"

[packages]
django = "==4.2.*"
djangorestframework = "*"
coreapi = "*"
dateparser = "*"
dj-rest-auth = "*"
django = "==5.1.*"
django-admin-rangefilter = "*"
django-allauth = "*"
django-autoslug = "*"
django-bootstrap4 = "*"
django-constance = {extras = ["database"], version = "*"}
django-extensions = "*"
coreapi = "*"
django-log-request-id = "*"
django-filter = "*"
django-log-request-id = "*"
django-mailer = "*"
django-oauth-toolkit = ">=1.5.0"
djangorestframework = "*"
djangorestframework-filters = "==1.0.0.dev2"
mysqlclient = "*"
drf-api-tracking = "*"
phonenumbers = "*"
gunicorn = "*"
django-bootstrap4 = "*"
django-autoslug = "*"
django-mailer = "*"
openpyxl = "*"
matrix-nio = "*"
markdown = "*"
django-admin-rangefilter = "*"
django-oauth-toolkit = ">=1.5.0"
dateparser = "*"
mysqlclient = "*"
nordigen = "*"
django-constance = {extras = ["database"], version = "*"}
openpyxl = "*"
phonenumbers = "*"
setuptools = "*"

[requires]
python_version = "3.9"
python_version = "3.11"

[pipenv]
#
Expand Down
1,600 changes: 1,105 additions & 495 deletions Pipfile.lock

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ brew install gettext
Find a way to install the software on this list (click the links to find installer downloads):

* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [python](https://www.python.org/downloads/) 3.9
* [python](https://www.python.org/downloads/) 3.11
* [gettext](https://www.gnu.org/software/gettext/) for translation editing and compiling
* [MySQL C API (libmysqlclient)](https://dev.mysql.com/downloads/c-api/)
* [pipenv](https://github.com/pypa/pipenv)
Expand All @@ -81,6 +81,10 @@ pipenv sync --dev
pipenv shell
```

If pipenv sync asks to run pipenv lock, run it.

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 +100,12 @@ CSRF_COOKIE_NAME = '__NotReallyHost-csrf'
./manage.py runserver
```

## To create an 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
14 changes: 14 additions & 0 deletions drfx/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
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"
# URL to register to Matrix, if no account provided
MATRIX_ACCOUNT_CRETION_URL = "https://chat.hacklab.fi/#/login"
# Site specific help text for registration
MATRIX_ACCOUNT_CRETION_HELP = "Choose Continue with Hacklab Finland Keycloack"

# External urls, like links to members guide and rules
ASSOCIATION_RULES_URL = (
Expand Down Expand Up @@ -382,6 +394,8 @@
str,
),
"GITHUB_URL": (GITHUB_URL, "Link to the github repository", 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 <sami@olmari.fi>\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
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
skipsdist=True
envlist = black,flake8,py39
envlist = black,flake8,py311

[testenv:black]
commands = black . --check
Expand Down Expand Up @@ -29,7 +29,7 @@ known_django = django
known_first_party = utils
sections = STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

[testenv:py39]
[testenv:py311]
deps =
pipenv
commands =
Expand Down
Loading

0 comments on commit 38176d1

Please sign in to comment.