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

Upgrade dependencies and Python to 3.11 #409

Merged
merged 14 commits into from
May 17, 2024
Merged
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Black Code Formatter
uses: lgeiger/[email protected]
with:
args: --check --target-version py36 --line-length 120 --skip-string-normalization --exclude '(migrations|urls\.py)' stregsystem stregreport kiosk
args: --check --target-version py311 --line-length 120 --skip-string-normalization --exclude '(migrations|urls\.py)' stregsystem stregreport kiosk
2 changes: 1 addition & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.6.9", "3.7.17", "3.11.5"] # 3.6.9 is what is running on prod
python-version: ["3.10.14", "3.11.9"] # 3.11.9 is what is running on prod
krestenlaust marked this conversation as resolved.
Show resolved Hide resolved

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Python Environment
For windows using Anaconda and virtual environments:
1. Download and install Anaconda
2. In a shell:
- `conda create -n stregsystem python=3.6`
- `conda create -n stregsystem python=3.11.9`
- `activate stregsystem`
- `pip install -r requirements.txt`
3. ???
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Django==2.2.28
Pillow==8.3.2
Coverage==4.4.1
pytz==2021.3
freezegun==0.3.15
Django-Select2==5.11.1
django-debug-toolbar==1.11.1
requests==2.24.0
qrcode==6.1
Django==4.2.13
Pillow==10.3.0
Coverage==7.5.1
pytz==2024.1
freezegun==1.5.1
Django-Select2==8.1.2
django-debug-toolbar==4.3.0
requests==2.31.0
qrcode==7.4.2
2 changes: 1 addition & 1 deletion stregsystem/templates/admin/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% load admin_static %}
{% load static %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static 'admin/css/dashboard.css' %}" />{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion stregsystem/templates/admin/stregsystem/batch_payment.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}

<div id="content-main">
<form method="post" action="" id="paymentform">{% csrf_token %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">Hjem</a></div>{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static '/stregsystem/razzia.css' %}" />

<div id="content-main">
Expand Down
2 changes: 1 addition & 1 deletion stregsystem/templates/admin/stregsystem/mobilepaytool.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}
{% load stregsystem_extras %}

<div id="content-main">
Expand Down
2 changes: 1 addition & 1 deletion stregsystem/templates/admin/stregsystem/razzia/razzia.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block title %}{{title|default:"Razzia"}}{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static '/stregsystem/razzia.css' %}" />

<script src="https://use.fontawesome.com/fd7e4e00a3.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion stregsystem/templates/admin/stregsystem/razzia/wizard.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Hjem</a>&nbsp;&rsaquo;&nbsp;<a href="../../">Stregsystem</a>&nbsp;&rsaquo;&nbsp;<a>Razzia</a>&nbsp;&rsaquo;&nbsp;Wizard</div>{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static '/stregsystem/razzia.css' %}" />

<script src="https://use.fontawesome.com/fd7e4e00a3.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Hjem</a>&nbsp;&rsaquo;&nbsp;<a href="../../">Stregsystem</a>&nbsp;&rsaquo;&nbsp;<a>Razzia</a>&nbsp;&rsaquo;&nbsp;Wizard View</div>{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static '/stregsystem/razzia.css' %}" />

<script src="https://use.fontawesome.com/fd7e4e00a3.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion stregsystem/templates/admin/stregsystem/report/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% load admin_static %}
{% load static %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static 'admin/css/dashboard.css' %}" />{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion stregsystem/templates/admin/stregsystem/report/sales.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Hjem</a>&nbsp;&rsaquo;&nbsp;<a href="../../">Stregsystem</a>&nbsp;&rsaquo;&nbsp;<a href="../">Reports</a>&nbsp;&rsaquo;&nbsp;Salgsraporteringer</div>{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/forms.css' %}" />
<script type="text/javascript">window.__admin_media_prefix__ = "/media/";</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Hjem</a>&nbsp;&rsaquo;&nbsp;<a href="../../">Stregsystem</a>&nbsp;&rsaquo;&nbsp;<a href="../">Reports</a>&nbsp;&rsaquo;&nbsp;Salgsraporteringer</div>{% endblock %}

{% block content %}
{% load admin_static %}
{% load static %}
<div id="content-container">
<form method="post" action="">
{% csrf_token %}
Expand Down
4 changes: 2 additions & 2 deletions stregsystem/templates/stregsystem/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
</td>
<td align=center>
<h1>{% block heading %}TREOENs STREGSYSTEM
{% ifnotequal room.id 1 %}
{% if room.id != 1 %}
: {{room.description}}
{% endifnotequal %}
{% endif %}
{% endblock %}</h1>
</td>
<td>
Expand Down
6 changes: 3 additions & 3 deletions stregsystem/templates/stregsystem/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
{% load listutil %}

{% block title %}TREOENs STREGSYSTEM
{% ifnotequal room.id 1 %}
: {{room.description}}
{% endifnotequal %}
{% if room.id != 1 %}
: {{room.description}}
{% endif %}
{% endblock %}

{% block content %}
Expand Down
4 changes: 2 additions & 2 deletions stregsystem/templates/stregsystem/ranks.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
{% load stregsystem_extras %}

{% block title %}TREOENs STREGSYSTEM
{% ifnotequal room.id 1 %}
{% if room.id != 1 %}
: {{room.description}}
{% endifnotequal %}
{% endif %}
{% endblock %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion stregsystem/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def test_payment_delete_already_saved(self, make_payment):
def test_payment_delete_not_saved(self, make_payment):
payment = Payment(member=self.member, amount=100)

with self.assertRaises(AssertionError):
with self.assertRaises(ValueError):
payment.delete()


Expand Down
4 changes: 3 additions & 1 deletion treo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from io import StringIO
import json

from django.conf.global_settings import DEFAULT_AUTO_FIELD

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand Down Expand Up @@ -71,7 +72,7 @@

CSRF_COOKIE_SECURE = cfg.getboolean("debug", "CSRF_COOKIE_SECURE")
CSRF_COOKIE_HTTPONLY = cfg.getboolean("debug", "CSRF_COOKIE_HTTPONLY")
CSRF_TRUSTED_ORIGINS = ["fappen.fklub.dk"]
CSRF_TRUSTED_ORIGINS = ["https://fappen.fklub.dk"]
krestenlaust marked this conversation as resolved.
Show resolved Hide resolved
SESSION_COOKIE_SECURE = cfg.getboolean("debug", "SESSION_COOKIT_SECURE")

SECURE_BROWSER_XSS_FILTER = cfg.getboolean("debug", "SECURE_BROWSER_XSS_FILTER")
Expand Down Expand Up @@ -135,6 +136,7 @@
]

WSGI_APPLICATION = 'treo.wsgi.application'
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
Expand Down
Loading