31 Commits

Author SHA1 Message Date
heinzel 6dfaaa4965 Merge pull request 'Merge stage (Djang5.2/Python3.14 stuff) into production' (#97) from stage into production
Run tests / Execute tox to run the test suite (push) Successful in 3m23s
Reviewed-on: #97
2026-05-08 09:30:29 +02:00
heinzel fe43a44c9c Merge pull request 'Update to django 5.2 to support python 3.14' (#96) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 2s
Run tests / Execute tox to run the test suite (push) Successful in 4m2s
Reviewed-on: #96
2026-04-29 13:59:10 +02:00
heinzel f821d09bdc Merge pull request 'Merge in some changes to support django5.2 and python3.14' (#95) from hzl_update into master
Run tests / Execute tox to run the test suite (push) Successful in 4m10s
Reviewed-on: #95
2026-04-20 15:02:35 +02:00
heinzel d75dd661e5 Modified template for exporting event lists for KA Alpin
Run tests / Execute tox to run the test suite (push) Failing after 55s
2026-04-20 14:52:03 +02:00
heinzel cdd6f3d9c6 Update django from <5.1 to <6 2026-04-20 14:44:46 +02:00
heinzel bbfa525b4c Replaced pkg_resources with importlib.resources 2026-04-20 14:44:16 +02:00
heinzel 5c161f8e76 Replaced deprecated User.objects.make_random_password() 2026-04-20 14:42:37 +02:00
heinzel 04c8130da8 Merge pull request 'Deploy Django5 stuff on production' (#93) from stage into production
Run tests / Execute tox to run the test suite (push) Successful in 4m42s
Reviewed-on: #93
2025-04-11 11:23:23 +02:00
heinzel d43584ef03 Merge pull request 'Test django 5 and Python 3.13' (#92) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 5s
Run tests / Execute tox to run the test suite (push) Successful in 4m51s
Reviewed-on: #92
2025-04-11 10:36:26 +02:00
heinzel f3db0424be Merge pull request 'New Stuff' (#90) from stage into production
Run tests / Execute tox to run the test suite (push) Successful in 3m38s
Reviewed-on: #90
2024-09-19 15:51:14 +02:00
heinzel 3fd8dfa9eb Merge pull request 'Test new stuff' (#89) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 4s
Run tests / Execute tox to run the test suite (push) Successful in 3m38s
Reviewed-on: #89
2024-09-19 15:49:23 +02:00
heinzel 26bd7ccdb6 Merge pull request 'Release new stuff from stage' (#87) from stage into production
Run tests / Execute tox to run the test suite (push) Successful in 3m24s
Reviewed-on: #87
2024-09-16 15:05:17 +02:00
heinzel bdbb4622c1 Merge pull request 'Test new stuff from master' (#86) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 3s
Run tests / Execute tox to run the test suite (push) Successful in 3m24s
Reviewed-on: #86
2024-09-16 15:03:35 +02:00
heinzel ad87130f64 Merge pull request 'stage' (#85) from stage into production
Run tests / Execute tox to run the test suite (push) Successful in 3m42s
Reviewed-on: #85
2024-09-16 09:50:11 +02:00
heinzel 3c2730f571 Merge pull request 'dav_registration: made the new JSON-View export a dict instead of a list' (#84) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 4s
Run tests / Execute tox to run the test suite (push) Successful in 3m39s
Reviewed-on: #84
2024-09-16 09:48:56 +02:00
heinzel 5474b9d9db Merge pull request 'stage' (#83) from stage into production
Run tests / Execute tox to run the test suite (push) Successful in 3m36s
Reviewed-on: #83
2024-09-16 08:58:34 +02:00
heinzel a95269cdb0 Merge pull request 'Update the production branch' (#82) from master into production
Run tests / Execute tox to run the test suite (push) Successful in 3m29s
Reviewed-on: #82
2024-09-16 08:50:38 +02:00
heinzel 47f06c52db Merge pull request 'master' (#81) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 4s
Run tests / Execute tox to run the test suite (push) Successful in 3m50s
Reviewed-on: #81
2024-09-12 15:29:19 +02:00
heinzel 59a79720e3 Merge pull request 'Test master stuff on stage' (#79) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 4s
Run tests / Execute tox to run the test suite (push) Successful in 3m21s
Reviewed-on: #79
2024-09-12 08:55:38 +02:00
heinzel 5016ec5d0e Merge pull request 'Test new stuff from master on stage' (#77) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 3s
Run tests / Execute tox to run the test suite (push) Successful in 3m21s
Reviewed-on: #77
2024-09-10 16:19:29 +02:00
heinzel 0e0d302f0c Merge branch 'master' into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 3s
Run tests / Execute tox to run the test suite (push) Successful in 3m23s
2024-09-10 15:03:54 +02:00
heinzel fab87ffa21 Merge pull request 'test newest stuff from master on stage' (#75) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 3s
Run tests / Execute tox to run the test suite (push) Successful in 3m9s
Reviewed-on: #75
2024-09-10 09:42:52 +02:00
heinzel e4da2738e0 Merge pull request 'deploy latest stuff on stage' (#73) from master into stage
Deploy into stage environment / Deploy into stage environment (push) Successful in 3s
Run tests / Execute tox to run the test suite (push) Successful in 2m21s
Reviewed-on: #73
2024-08-02 15:59:09 +02:00
heinzel 65ace70981 Merge pull request 'Fix #61' (#68) from master into production
buildbot/django-dav-events--test Build done.
Reviewed-on: #68
2023-05-08 15:37:47 +02:00
heinzel ca6ca88b34 Merge pull request 'Fixed typo in "Schwierigkeitsniveau"' (#67) from master into production
buildbot/django-dav-events--test Build done.
Reviewed-on: #67
2023-05-08 13:53:50 +02:00
heinzel c10d447802 Merge pull request 'Update production branch with latest stuff' (#66) from master into production
buildbot/django-dav-events--test Build done.
Reviewed-on: #66
2023-05-08 12:48:23 +02:00
heinzel cb3c9a0e98 Merge pull request 'Merge Makefile into production for CI/CD stuff' (#58) from master into production
Reviewed-on: #58
2023-02-17 14:09:15 +01:00
heinzel c9572d631f Merge pull request 'update production branch' (#57) from master into production
buildbot/tox Build done.
Reviewed-on: #57
2023-02-15 19:48:19 +01:00
heinzel 6e67e2767b Merge pull request 'merge new master stuff into production' (#47) from master into production
buildbot/tox Build done.
Reviewed-on: #47
2021-01-27 12:13:21 +01:00
heinzel b603f852a3 Merge pull request 'Update production branch to master' (#45) from master into production
buildbot/tox Build done.
Reviewed-on: #45
2021-01-27 11:55:47 +01:00
heinzel cb364e5745 Merge pull request 'Production environment is updated.' (#43) from master into production
buildbot/tox Build done.
Reviewed-on: #43
2021-01-07 14:42:48 +01:00
12 changed files with 23 additions and 56 deletions
+4 -1
View File
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging import logging
import secrets
from django.apps import apps from django.apps import apps
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.contrib import messages from django.contrib import messages
@@ -82,13 +83,15 @@ class CreateAndSendPasswordView(generic.FormView):
form_class = forms.CreateAndSendPasswordForm form_class = forms.CreateAndSendPasswordForm
template_name = 'dav_auth/forms/recreate_password.html' template_name = 'dav_auth/forms/recreate_password.html'
success_url = reverse_lazy('dav_auth:login') success_url = reverse_lazy('dav_auth:login')
password_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789#$%&@^~.,:;/_-*+!?'
password_length = 32
def form_valid(self, form): def form_valid(self, form):
username = form.cleaned_data.get('username') username = form.cleaned_data.get('username')
user_model = get_user_model() user_model = get_user_model()
try: try:
user = user_model.objects.get(username=username) user = user_model.objects.get(username=username)
random_password = user_model.objects.make_random_password(length=32) random_password = ''.join(secrets.choice(self.password_chars) for i in range(self.password_length))
user.set_password(random_password) user.set_password(random_password)
user.save() user.save()
email = emails.PasswordSetEmail(user, random_password) email = emails.PasswordSetEmail(user, random_password)
+2 -2
View File
@@ -1,6 +1,6 @@
import json import json
import os import os
import pkg_resources from importlib.resources import files as resource_files
from django.conf import settings from django.conf import settings
from django.urls import re_path, include from django.urls import re_path, include
@@ -65,7 +65,7 @@ class ModuleMeta:
def _load_from_package(self): def _load_from_package(self):
package_name = self._package_name package_name = self._package_name
json_text = pkg_resources.resource_string(package_name, self._json_file) json_text = resource_files(package_name).joinpath(self._json_file).read_bytes()
meta_dict = json.loads(json_text) meta_dict = json.loads(json_text)
meta_dict['package'] = package_name meta_dict['package'] = package_name
self.load_from_dict(meta_dict) self.load_from_dict(meta_dict)
+7 -7
View File
@@ -2,7 +2,7 @@ import argparse
import os import os
import posix import posix
import sys import sys
import pkg_resources from importlib.resources import files as resource_files
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
from dav_base.config.modules import DJANGO_MAIN_MODULE, ModuleConfig from dav_base.config.modules import DJANGO_MAIN_MODULE, ModuleConfig
@@ -94,20 +94,20 @@ class AdminCommand: # pylint: disable=too-few-public-methods
config = ModuleConfig(django_base_dir=django_base_dir) config = ModuleConfig(django_base_dir=django_base_dir)
config.save() config.save()
input_file = os.path.join('django_project_config', 'additional_settings.py') input_file = resource_files(__package__).joinpath('django_project_config', 'additional_settings.py')
output_file = os.path.join(django_base_dir, django_main_module, 'settings.py') output_file = os.path.join(django_base_dir, django_main_module, 'settings.py')
with open(output_file, 'ab') as f: with open(output_file, 'ab') as f:
f.write(pkg_resources.resource_string(__package__, input_file)) f.write(input_file.read_bytes())
input_file = os.path.join('django_project_config', 'urls.py') input_file = resource_files(__package__).joinpath('django_project_config', 'urls.py')
output_file = os.path.join(django_base_dir, django_main_module, 'urls.py') output_file = os.path.join(django_base_dir, django_main_module, 'urls.py')
with open(output_file, 'wb') as f: with open(output_file, 'wb') as f:
f.write(pkg_resources.resource_string(__package__, input_file)) f.write(input_file.read_bytes())
input_file = os.path.join('django_project_config', 'settings-dav_base.py') input_file = resource_files(__package__).joinpath('django_project_config', 'settings-dav_base.py')
output_file = os.path.join(django_base_dir, django_main_module, 'settings-dav_base.py') output_file = os.path.join(django_base_dir, django_main_module, 'settings-dav_base.py')
with open(output_file, 'wb') as f: with open(output_file, 'wb') as f:
f.write(pkg_resources.resource_string(__package__, input_file)) f.write(input_file.read_bytes())
return posix.EX_OK return posix.EX_OK
@@ -1,5 +1,5 @@
import os import os
import pkg_resources from importlib.resources import files as resource_files
from django.conf import settings from django.conf import settings
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand, CommandError
@@ -23,12 +23,12 @@ class Command(BaseCommand):
raise CommandError('Module \'{}\' is already enabled'.format(module_name)) raise CommandError('Module \'{}\' is already enabled'.format(module_name))
settings_file_name = 'settings-{}.py'.format(module_name) settings_file_name = 'settings-{}.py'.format(module_name)
input_file = os.path.join('django_project_config', settings_file_name) input_file = resource_files(module_name).joinpath('django_project_config', settings_file_name)
if pkg_resources.resource_exists(module_name, input_file): if input_file.is_file():
output_file = os.path.join(django_base_dir, django_main_module, settings_file_name) output_file = os.path.join(django_base_dir, django_main_module, settings_file_name)
if not os.path.exists(output_file): if not os.path.exists(output_file):
with open(output_file, 'wb') as f: with open(output_file, 'wb') as f:
f.write(pkg_resources.resource_string(module_name, input_file)) f.write(input_file.read_bytes())
module_meta_obj = ModuleMeta(module_name) module_meta_obj = ModuleMeta(module_name)
config.modules[module_name] = module_meta_obj config.modules[module_name] = module_meta_obj
-1
View File
@@ -76,7 +76,6 @@ LEVEL_CHOICES = ChoiceSet([
('beginner', _(u'Anfänger')), ('beginner', _(u'Anfänger')),
('advanced', _(u'Fortgeschrittene')), ('advanced', _(u'Fortgeschrittene')),
('family', _(u'Familien')), ('family', _(u'Familien')),
('senior', _(u'Senioren'))
]) ])
MEALS_CHOICES = ChoiceSet([ MEALS_CHOICES = ChoiceSet([
-4
View File
@@ -56,10 +56,6 @@ class AbstractParticipant(models.Model):
privacy_policy_accepted = models.BooleanField(default=False, privacy_policy_accepted = models.BooleanField(default=False,
verbose_name=_('Einwilligung zur Datenspeicherung')) verbose_name=_('Einwilligung zur Datenspeicherung'))
participation_conditions_accepted = models.BooleanField(default=False,
verbose_name=_('Einwilligung der Teilnahmebedingungen'))
paid = models.BooleanField('Teilnehmerbeitrag bezahlt', default=False) paid = models.BooleanField('Teilnehmerbeitrag bezahlt', default=False)
purge_at = models.DateTimeField() purge_at = models.DateTimeField()
@@ -3,6 +3,8 @@
{{ normalized_short_date }} {{ normalized_short_date }}
{% if alt_normalized_short_date %}({% trans 'Ersatztermin' %}: {{ alt_normalized_short_date }}) {% if alt_normalized_short_date %}({% trans 'Ersatztermin' %}: {{ alt_normalized_short_date }})
{% endif %} {% endif %}
{% if trainer_email or trainer_phone %}{% if trainer_email %}{{ trainer_email }}{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %}{{ trainer_phone }}{% endif %}
{% endif %}
{{ description }} {{ description }}
{% if mode == 'training' %} {% if mode == 'training' %}
{% trans 'Kursinhalte' %}: {% trans 'Kursinhalte' %}:
@@ -44,5 +46,5 @@
{% endif %}{% if charge > 0 or additional_costs %}{% trans 'Kosten' %}: {% if charge > 0 %}{{ charge|floatformat:'-2' }} € {% trans 'Teilnahmegebühr' %}{% endif %}{% if additional_costs %}{% if charge > 0 %} {% trans 'zzgl.' %} {% endif %}{{ additional_costs }}{% endif %} {% endif %}{% if charge > 0 or additional_costs %}{% trans 'Kosten' %}: {% if charge > 0 %}{{ charge|floatformat:'-2' }} € {% trans 'Teilnahmegebühr' %}{% endif %}{% if additional_costs %}{% if charge > 0 %} {% trans 'zzgl.' %} {% endif %}{{ additional_costs }}{% endif %}
{% endif %}{% if registration_required and deadline %}{% trans 'Anmeldeschluss' %}: {{ deadline|date:'D, j. N Y' }} {% endif %}{% if registration_required and deadline %}{% trans 'Anmeldeschluss' %}: {{ deadline|date:'D, j. N Y' }}
{% endif %}{% if trainer_2_fullname %}{% if mode == 'training' %}{% trans 'Ausbildungsteam' %}:{% else %}{% trans 'Team' %}:{% endif %} {{ trainer_firstname }} {{ trainer_familyname }}, {{ trainer_2_fullname }}{% if trainer_3_fullname %}, {{ trainer_3_fullname }}{% endif %} {% endif %}{% if trainer_2_fullname %}{% if mode == 'training' %}{% trans 'Ausbildungsteam' %}:{% else %}{% trans 'Team' %}:{% endif %} {{ trainer_firstname }} {{ trainer_familyname }}, {{ trainer_2_fullname }}{% if trainer_3_fullname %}, {{ trainer_3_fullname }}{% endif %}
{% endif %}{% if trainer_familyname %}{% trans 'Leitung' %}: {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}{{ trainer_email }}{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %}{{ trainer_phone }}{% endif %}){% endif %} {% endif %}{% if trainer_familyname %}{% trans 'Leitung' %}: {{ trainer_firstname }} {{ trainer_familyname }}
{% endif %} {% endif %}
+1 -11
View File
@@ -51,7 +51,7 @@ class RegistrationForm(forms.ModelForm):
' Das finden wir gut,' ' Das finden wir gut,'
' aber bitte melde dich besser mal per E-Mail bei uns.'), ' aber bitte melde dich besser mal per E-Mail bei uns.'),
params={'max_age': max_age}, params={'max_age': max_age},
code='too_old', code='to_old',
) )
return val return val
@@ -79,16 +79,6 @@ class RegistrationForm(forms.ModelForm):
) )
return val return val
def clean_participation_conditions_accepted(self):
val = self.cleaned_data.get('participation_conditions_accepted')
if not val:
raise forms.ValidationError(
ugettext('Um an dieser Veranstaltung teilnehmen zu können,'
' musst du die Teilnahmebedingungen akzeptieren.'),
code='participation_conditions_not_accepted',
)
return val
def clean(self): def clean(self):
super().clean() super().clean()
dav_member = self.cleaned_data.get('dav_member') dav_member = self.cleaned_data.get('dav_member')
-2
View File
@@ -84,8 +84,6 @@ class Registration(models.Model):
verbose_name=_('Einwilligung zur Datenspeicherung')) verbose_name=_('Einwilligung zur Datenspeicherung'))
purge_at = models.DateTimeField(_('Zeitpunkt der Datenlöschung')) purge_at = models.DateTimeField(_('Zeitpunkt der Datenlöschung'))
participation_conditions_accepted = models.BooleanField(default=False, verbose_name=_('Einwilligung der Teilnahmebedingungen'))
answered_obsolete = models.BooleanField(default=False, verbose_name=_('Durch Tourleitung beantwortet')) answered_obsolete = models.BooleanField(default=False, verbose_name=_('Durch Tourleitung beantwortet'))
def approx_age(self): def approx_age(self):
@@ -9,7 +9,6 @@
<button id="btn-filter-All" type="button" class="btn btn-xs btn-green">Alle Touren</button> <button id="btn-filter-All" type="button" class="btn btn-xs btn-green">Alle Touren</button>
<button id="btn-filter-B" type="button" class="btn btn-xs btn-sport-B btn-white">Bergsteigen</button> <button id="btn-filter-B" type="button" class="btn btn-xs btn-sport-B btn-white">Bergsteigen</button>
<button id="btn-filter-family" type="button" class="btn btn-xs btn-level-family btn-white">Familien</button> <button id="btn-filter-family" type="button" class="btn btn-xs btn-level-family btn-white">Familien</button>
<button id="btn-filter-senior" type="button" class="btn btn-xs btn-level-senior btn-white">Senioren</button>
<button id="btn-filter-K" type="button" class="btn btn-xs btn-sport-K btn-white">Klettern</button> <button id="btn-filter-K" type="button" class="btn btn-xs btn-sport-K btn-white">Klettern</button>
<button id="btn-filter-M" type="button" class="btn btn-xs btn-sport-M btn-white">Mountainbike</button> <button id="btn-filter-M" type="button" class="btn btn-xs btn-sport-M btn-white">Mountainbike</button>
<button id="btn-filter-S" type="button" class="btn btn-xs btn-sport-S btn-white">Ski</button> <button id="btn-filter-S" type="button" class="btn btn-xs btn-sport-S btn-white">Ski</button>
@@ -128,7 +127,7 @@
<script type="text/javascript"> <script type="text/javascript">
function filter_table(table, filter) { function filter_table(table, filter) {
const sport_choices = ["B", "K", "M", "S", "W"]; const sport_choices = ["B", "K", "M", "S", "W"];
const level_choices = ["beginner", "advanced", "family", "senior"]; const level_choices = ["beginner", "advanced", "family"];
var choices = sport_choices.concat(level_choices); var choices = sport_choices.concat(level_choices);
var filter_cleaned = []; var filter_cleaned = [];
var filter_expr; var filter_expr;
@@ -201,9 +200,6 @@
$("#btn-filter-family").on("click", function() { $("#btn-filter-family").on("click", function() {
toggle_filter(table, filter, "family"); toggle_filter(table, filter, "family");
} ); } );
$("#btn-filter-senior").on("click", function() {
toggle_filter(table, filter, "senior");
} );
$("#searchfield").on( "keyup change", function() { $("#searchfield").on( "keyup change", function() {
table.column(0).search( this.value ).draw(); table.column(0).search( this.value ).draw();
} ); } );
@@ -182,23 +182,6 @@
Der/die Tourenleiter/in wird dir also persönlich per E-Mail zu- oder absagen. Der/die Tourenleiter/in wird dir also persönlich per E-Mail zu- oder absagen.
</small></p> </small></p>
</div> </div>
{% if form.participation_conditions_accepted.errors %}
<div class="has-error">
{% endif %}
<div class="checkbox">
<label>
<input type="checkbox" name="participation_conditions_accepted" {% if form.participation_conditions_accepted.value %}checked="checked"{% endif %}>
{% trans 'Ich habe den oben erläuterten Teilnahmevorbehalt und die <a href="https://www.alpenverein-karlsruhe.de/programm/teilnahmebedingungen" target="_blank" rel="noreferrer noopener">Teilnahmebedingungen</a> gelesen und akzeptiert.' %}
</label>
</div>
{% if form.participation_conditions_accepted.errors %}
<div class="help-block">
{% for error in form.participation_conditions_accepted.errors %}
<p>{{ error }}</p>
{% endfor %}
</div>
</div>
{% endif %}
</div> </div>
</div> </div>
<div class="row">&nbsp;</div> <div class="row">&nbsp;</div>
+1 -1
View File
@@ -1,5 +1,5 @@
babel babel
django<5.1 django<6
django-bootstrap3 django-bootstrap3
django-countries django-countries
django-datetime-widget2 django-datetime-widget2