24 Commits

Author SHA1 Message Date
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
6 changed files with 16 additions and 21 deletions
+1 -4
View File
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import logging
import secrets
from django.apps import apps
from django.core.exceptions import ValidationError
from django.contrib import messages
@@ -83,15 +82,13 @@ class CreateAndSendPasswordView(generic.FormView):
form_class = forms.CreateAndSendPasswordForm
template_name = 'dav_auth/forms/recreate_password.html'
success_url = reverse_lazy('dav_auth:login')
password_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789#$%&@^~.,:;/_-*+!?'
password_length = 32
def form_valid(self, form):
username = form.cleaned_data.get('username')
user_model = get_user_model()
try:
user = user_model.objects.get(username=username)
random_password = ''.join(secrets.choice(self.password_chars) for i in range(self.password_length))
random_password = user_model.objects.make_random_password(length=32)
user.set_password(random_password)
user.save()
email = emails.PasswordSetEmail(user, random_password)
+2 -2
View File
@@ -1,6 +1,6 @@
import json
import os
from importlib.resources import files as resource_files
import pkg_resources
from django.conf import settings
from django.urls import re_path, include
@@ -65,7 +65,7 @@ class ModuleMeta:
def _load_from_package(self):
package_name = self._package_name
json_text = resource_files(package_name).joinpath(self._json_file).read_bytes()
json_text = pkg_resources.resource_string(package_name, self._json_file)
meta_dict = json.loads(json_text)
meta_dict['package'] = package_name
self.load_from_dict(meta_dict)
+7 -7
View File
@@ -2,7 +2,7 @@ import argparse
import os
import posix
import sys
from importlib.resources import files as resource_files
import pkg_resources
from django.core.management import execute_from_command_line
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.save()
input_file = resource_files(__package__).joinpath('django_project_config', 'additional_settings.py')
input_file = os.path.join('django_project_config', 'additional_settings.py')
output_file = os.path.join(django_base_dir, django_main_module, 'settings.py')
with open(output_file, 'ab') as f:
f.write(input_file.read_bytes())
f.write(pkg_resources.resource_string(__package__, input_file))
input_file = resource_files(__package__).joinpath('django_project_config', 'urls.py')
input_file = os.path.join('django_project_config', 'urls.py')
output_file = os.path.join(django_base_dir, django_main_module, 'urls.py')
with open(output_file, 'wb') as f:
f.write(input_file.read_bytes())
f.write(pkg_resources.resource_string(__package__, input_file))
input_file = resource_files(__package__).joinpath('django_project_config', 'settings-dav_base.py')
input_file = os.path.join('django_project_config', '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:
f.write(input_file.read_bytes())
f.write(pkg_resources.resource_string(__package__, input_file))
return posix.EX_OK
@@ -1,5 +1,5 @@
import os
from importlib.resources import files as resource_files
import pkg_resources
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
@@ -23,12 +23,12 @@ class Command(BaseCommand):
raise CommandError('Module \'{}\' is already enabled'.format(module_name))
settings_file_name = 'settings-{}.py'.format(module_name)
input_file = resource_files(module_name).joinpath('django_project_config', settings_file_name)
if input_file.is_file():
input_file = os.path.join('django_project_config', settings_file_name)
if pkg_resources.resource_exists(module_name, input_file):
output_file = os.path.join(django_base_dir, django_main_module, settings_file_name)
if not os.path.exists(output_file):
with open(output_file, 'wb') as f:
f.write(input_file.read_bytes())
f.write(pkg_resources.resource_string(module_name, input_file))
module_meta_obj = ModuleMeta(module_name)
config.modules[module_name] = module_meta_obj
@@ -3,8 +3,6 @@
{{ normalized_short_date }}
{% if alt_normalized_short_date %}({% trans 'Ersatztermin' %}: {{ alt_normalized_short_date }})
{% 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 }}
{% if mode == 'training' %}
{% trans 'Kursinhalte' %}:
@@ -46,5 +44,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 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_familyname %}{% trans 'Leitung' %}: {{ trainer_firstname }} {{ trainer_familyname }}
{% 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 %}
+1 -1
View File
@@ -1,5 +1,5 @@
babel
django<6
django<5.1
django-bootstrap3
django-countries
django-datetime-widget2