Commit 8c1b5b15 authored by Felix Schlösser / TinTin's avatar Felix Schlösser / TinTin
Browse files

implemented motion and meetings model

parent a159b172
Pipeline #142075 failed with stages
in 4 seconds
""" """
Base settings to build other settings files upon. Base settings to build other settings files upon.
""" """
from django.utils.translation import gettext_lazy as _
from pathlib import Path from pathlib import Path
import environ import environ
...@@ -26,6 +28,11 @@ DEBUG = env.bool("DJANGO_DEBUG", False) ...@@ -26,6 +28,11 @@ DEBUG = env.bool("DJANGO_DEBUG", False)
TIME_ZONE = "Europe/Berlin" TIME_ZONE = "Europe/Berlin"
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code # https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE = "de-de" LANGUAGE_CODE = "de-de"
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-LANGUAGES
LANGUAGES = [
('de', _('Deutsch')),
('en', _('Englisch')),
]
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id # https://docs.djangoproject.com/en/dev/ref/settings/#site-id
SITE_ID = 1 SITE_ID = 1
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n # https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
...@@ -33,7 +40,7 @@ USE_I18N = True ...@@ -33,7 +40,7 @@ USE_I18N = True
# https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n # https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n
USE_L10N = True USE_L10N = True
# https://docs.djangoproject.com/en/dev/ref/settings/#use-tz # https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
USE_TZ = True USE_TZ = False
# https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths # https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths
LOCALE_PATHS = [str(ROOT_DIR / "locale")] LOCALE_PATHS = [str(ROOT_DIR / "locale")]
...@@ -73,14 +80,20 @@ DJANGO_APPS = [ ...@@ -73,14 +80,20 @@ DJANGO_APPS = [
] ]
THIRD_PARTY_APPS = [ THIRD_PARTY_APPS = [
"crispy_forms", "crispy_forms",
"simple_history",
"taggit",
"djmoney",
"modeltranslation",
"rosetta"
] ]
LOCAL_APPS = [ LOCAL_APPS = [
"meeting_transparency.users", "meeting_transparency.motions",
"meeting_transparency.meetings",
# Your stuff: custom apps go here # Your stuff: custom apps go here
] ]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps # https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS INSTALLED_APPS = THIRD_PARTY_APPS + DJANGO_APPS + LOCAL_APPS
# MIGRATIONS # MIGRATIONS
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
...@@ -92,10 +105,9 @@ MIGRATION_MODULES = {"sites": "meeting_transparency.contrib.sites.migrations"} ...@@ -92,10 +105,9 @@ MIGRATION_MODULES = {"sites": "meeting_transparency.contrib.sites.migrations"}
# https://docs.djangoproject.com/en/dev/ref/settings/#authentication-backends # https://docs.djangoproject.com/en/dev/ref/settings/#authentication-backends
AUTHENTICATION_BACKENDS = [ AUTHENTICATION_BACKENDS = [
"django.contrib.auth.backends.ModelBackend", "django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
] ]
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-user-model # https://docs.djangoproject.com/en/dev/ref/settings/#auth-user-model
AUTH_USER_MODEL = "users.User" #AUTH_USER_MODEL = "users.User"
# https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url # https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url
LOGIN_REDIRECT_URL = "users:redirect" LOGIN_REDIRECT_URL = "users:redirect"
# https://docs.djangoproject.com/en/dev/ref/settings/#login-url # https://docs.djangoproject.com/en/dev/ref/settings/#login-url
...@@ -105,11 +117,11 @@ LOGIN_URL = "account_login" ...@@ -105,11 +117,11 @@ LOGIN_URL = "account_login"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers # https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers
PASSWORD_HASHERS = [ PASSWORD_HASHERS = [
# https://docs.djangoproject.com/en/dev/topics/auth/passwords/#using-argon2-with-django 'django.contrib.auth.hashers.PBKDF2PasswordHasher',
"django.contrib.auth.hashers.Argon2PasswordHasher", 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
"django.contrib.auth.hashers.PBKDF2PasswordHasher", 'django.contrib.auth.hashers.Argon2PasswordHasher',
"django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher", 'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
"django.contrib.auth.hashers.BCryptSHA256PasswordHasher", 'django.contrib.auth.hashers.ScryptPasswordHasher',
] ]
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators # https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [ AUTH_PASSWORD_VALIDATORS = [
...@@ -135,6 +147,7 @@ MIDDLEWARE = [ ...@@ -135,6 +147,7 @@ MIDDLEWARE = [
"django.contrib.messages.middleware.MessageMiddleware", "django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.common.BrokenLinkEmailsMiddleware", "django.middleware.common.BrokenLinkEmailsMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware",
"simple_history.middleware.HistoryRequestMiddleware",
] ]
# STATIC # STATIC
...@@ -250,3 +263,4 @@ LOGGING = { ...@@ -250,3 +263,4 @@ LOGGING = {
# Your stuff... # Your stuff...
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
TAGGIT_CASE_INSENSITIVE = True
...@@ -5,6 +5,9 @@ from django.urls import include, path ...@@ -5,6 +5,9 @@ from django.urls import include, path
from django.views import defaults as default_views from django.views import defaults as default_views
from django.views.generic import TemplateView from django.views.generic import TemplateView
admin.site.enable_nav_sidebar = False
urlpatterns = [ urlpatterns = [
path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), path("", TemplateView.as_view(template_name="pages/home.html"), name="home"),
path( path(
...@@ -13,11 +16,17 @@ urlpatterns = [ ...@@ -13,11 +16,17 @@ urlpatterns = [
# Django Admin, use {% url 'admin:index' %} # Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls), path(settings.ADMIN_URL, admin.site.urls),
# User management # User management
path("users/", include("meeting_tranparency.users.urls", namespace="users")), #path("users/", include("meeting_tranparency.users.urls", namespace="users")),
# Your stuff: custom urls includes go here # Your stuff: custom urls includes go here
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if 'rosetta' in settings.INSTALLED_APPS:
urlpatterns += [
path('rosetta/', include('rosetta.urls'))
]
if settings.DEBUG: if settings.DEBUG:
# This allows the error pages to be debugged during development, just visit # This allows the error pages to be debugged during development, just visit
# these url in browser to see how these error pages look like. # these url in browser to see how these error pages look like.
......
...@@ -20,8 +20,7 @@ from pathlib import Path ...@@ -20,8 +20,7 @@ from pathlib import Path
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
# This allows easy placement of apps within the interior # This allows easy placement of apps within the interior
# meeting_transparency # meeting_transparency directory.
directory.
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent
sys.path.append(str(ROOT_DIR / "meeting_tranparency")) sys.path.append(str(ROOT_DIR / "meeting_tranparency"))
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
......
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-12 15:54+0200\n"
"PO-Revision-Date: 2022-05-12 15:54+0200\n"
"Last-Translator: <>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Translated-Using: django-rosetta 0.9.8\n"
#: config/settings/base.py:33
msgid "Deutsch"
msgstr "German"
#: config/settings/base.py:34
msgid "Englisch"
msgstr "English"
#: meeting_transparency/meetings/apps.py:6
#: meeting_transparency/meetings/models.py:151
msgid "Sitzungen"
msgstr "meetings"
#: meeting_transparency/meetings/models.py:18
#: meeting_transparency/meetings/models.py:148
msgid "Legislaturperiode"
msgstr "legislature period"
#: meeting_transparency/meetings/models.py:19
msgid "Legislaturperioden"
msgstr "legislature periods"
#: meeting_transparency/meetings/models.py:50
msgid "Videokonfenrenzraum"
msgstr "video conference room"
#: meeting_transparency/meetings/models.py:51
msgid "Videokonfenrenzräume"
msgstr "video conference rooms"
#: meeting_transparency/meetings/models.py:63
msgid "Raum"
msgstr "room"
#: meeting_transparency/meetings/models.py:64
msgid "Räume"
msgstr "rooms"
#: meeting_transparency/meetings/models.py:74
msgid "in Präsenz"
msgstr "in person"
#: meeting_transparency/meetings/models.py:75
msgid "Online"
msgstr "online"
#: meeting_transparency/meetings/models.py:76
msgid "Hybrid"
msgstr "hybrid"
#: meeting_transparency/meetings/models.py:91
#: meeting_transparency/meetings/models.py:144
msgid "Format"
msgstr "format"
#: meeting_transparency/meetings/models.py:92
msgid "Formate"
msgstr "formats"
#: meeting_transparency/meetings/models.py:113
#: meeting_transparency/meetings/models.py:127
msgid "Unbekanntes Sitzungsformat"
msgstr "unknown meeting format"
#: meeting_transparency/meetings/models.py:135
msgid "Versandzeitpunkt der ersten Sitzungseinladung"
msgstr "mailing date of the first meeting invitation"
#: meeting_transparency/meetings/models.py:138
msgid "Versandzeitpunkt der letzten Sitzungseinladung"
msgstr "mailing date of the last meeting invitation"
#: meeting_transparency/meetings/models.py:150
msgid "Sitzung"
msgstr "meeting"
#: meeting_transparency/motions/apps.py:6
#: meeting_transparency/motions/models.py:42
msgid "Anträge"
msgstr "motions"
#: meeting_transparency/motions/models.py:18
msgid "Entwurf"
msgstr "draft"
#: meeting_transparency/motions/models.py:18
msgid "offen"
msgstr "open"
#: meeting_transparency/motions/models.py:18
msgid "vertagt"
msgstr "adjourned"
#: meeting_transparency/motions/models.py:18
msgid "zurückgezogen"
msgstr "withdrawn"
#: meeting_transparency/motions/models.py:25
msgid "Titel"
msgstr "title"
#: meeting_transparency/motions/models.py:28
msgid "Text"
msgstr "text"
#: meeting_transparency/motions/models.py:30
msgid "anhänge"
msgstr "attachements"
#: meeting_transparency/motions/models.py:37
msgid "Schlagwörter"
msgstr "tags"
#: meeting_transparency/motions/models.py:41
msgid "Antrag"
msgstr "motion"
#: meeting_transparency/motions/models.py:54
msgid "Finanzantrag"
msgstr "financial request"
#: meeting_transparency/motions/models.py:55
msgid "Finanzanträge"
msgstr "finacial requests"
#: meeting_transparency/templates/account/account_inactive.html:5
#: meeting_transparency/templates/account/account_inactive.html:8
msgid "Account Inactive"
msgstr ""
#: meeting_transparency/templates/account/account_inactive.html:10
msgid "This account is inactive."
msgstr ""
#: meeting_transparency/templates/account/email.html:7
msgid "Account"
msgstr ""
#: meeting_transparency/templates/account/email.html:10
msgid "E-mail Addresses"
msgstr ""
#: meeting_transparency/templates/account/email.html:13
msgid "The following e-mail addresses are associated with your account:"
msgstr ""
#: meeting_transparency/templates/account/email.html:27
msgid "Verified"
msgstr ""
#: meeting_transparency/templates/account/email.html:29
msgid "Unverified"
msgstr ""
#: meeting_transparency/templates/account/email.html:31
msgid "Primary"
msgstr ""
#: meeting_transparency/templates/account/email.html:37
msgid "Make Primary"
msgstr ""
#: meeting_transparency/templates/account/email.html:38
msgid "Re-send Verification"
msgstr ""
#: meeting_transparency/templates/account/email.html:39
msgid "Remove"
msgstr ""
#: meeting_transparency/templates/account/email.html:46
msgid "Warning:"
msgstr ""
#: meeting_transparency/templates/account/email.html:46
msgid ""
"You currently do not have any e-mail address set up. You should really add "
"an e-mail address so you can receive notifications, reset your password, "
"etc."
msgstr ""
#: meeting_transparency/templates/account/email.html:51
msgid "Add E-mail Address"
msgstr ""
#: meeting_transparency/templates/account/email.html:56
msgid "Add E-mail"
msgstr ""
#: meeting_transparency/templates/account/email.html:66
msgid "Do you really want to remove the selected e-mail address?"
msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:6
#: meeting_transparency/templates/account/email_confirm.html:10
msgid "Confirm E-mail Address"
msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:16
#, python-format
msgid ""
"Please confirm that <a href=\"mailto:%(email)s\">%(email)s</a> is an e-mail "
"address for user %(user_display)s."
msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:20
msgid "Confirm"
msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:27
#, python-format
msgid ""
"This e-mail confirmation link expired or is invalid. Please <a "
"href=\"%(email_url)s\">issue a new e-mail confirmation request</a>."
msgstr ""
#: meeting_transparency/templates/account/login.html:7
#: meeting_transparency/templates/account/login.html:11
#: meeting_transparency/templates/account/login.html:56
#: meeting_transparency/templates/base.html:73
msgid "Sign In"
msgstr ""
#: meeting_transparency/templates/account/login.html:17
msgid "Please sign in with one of your existing third party accounts:"
msgstr ""
#: meeting_transparency/templates/account/login.html:19
#, python-format
msgid ""
"Or, <a href=\"%(signup_url)s\">sign up</a> for a %(site_name)s account and "
"sign in below:"
msgstr ""
#: meeting_transparency/templates/account/login.html:32
msgid "or"
msgstr ""
#: meeting_transparency/templates/account/login.html:41
#, python-format
msgid ""
"If you have not created an account yet, then please <a "
"href=\"%(signup_url)s\">sign up</a> first."
msgstr ""
#: meeting_transparency/templates/account/login.html:55
msgid "Forgot Password?"
msgstr ""
#: meeting_transparency/templates/account/logout.html:5
#: meeting_transparency/templates/account/logout.html:8
#: meeting_transparency/templates/account/logout.html:17
#: meeting_transparency/templates/base.html:62
msgid "Sign Out"
msgstr ""
#: meeting_transparency/templates/account/logout.html:10
msgid "Are you sure you want to sign out?"
msgstr ""
#: meeting_transparency/templates/account/password_change.html:6
#: meeting_transparency/templates/account/password_change.html:9
#: meeting_transparency/templates/account/password_change.html:14
#: meeting_transparency/templates/account/password_reset_from_key.html:5
#: meeting_transparency/templates/account/password_reset_from_key.html:8
#: meeting_transparency/templates/account/password_reset_from_key_done.html:4
#: meeting_transparency/templates/account/password_reset_from_key_done.html:7
msgid "Change Password"
msgstr ""
#: meeting_transparency/templates/account/password_reset.html:7
#: meeting_transparency/templates/account/password_reset.html:11
#: meeting_transparency/templates/account/password_reset_done.html:6
#: meeting_transparency/templates/account/password_reset_done.html:9
msgid "Password Reset"
msgstr ""
#: meeting_transparency/templates/account/password_reset.html:16
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll send you"
" an e-mail allowing you to reset it."
msgstr ""
#: meeting_transparency/templates/account/password_reset.html:21
msgid "Reset My Password"
msgstr ""
#: meeting_transparency/templates/account/password_reset.html:24
msgid "Please contact us if you have any trouble resetting your password."
msgstr ""
#: meeting_transparency/templates/account/password_reset_done.html:15
msgid ""
"We have sent you an e-mail. Please contact us if you do not receive it "
"within a few minutes."
msgstr ""
#: meeting_transparency/templates/account/password_reset_from_key.html:8
msgid "Bad Token"
msgstr ""
#: meeting_transparency/templates/account/password_reset_from_key.html:12
#, python-format
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a <a href=\"%(passwd_reset_url)s\">new password "
"reset</a>."
msgstr ""
#: meeting_transparency/templates/account/password_reset_from_key.html:18
msgid "change password"
msgstr ""
#: meeting_transparency/templates/account/password_reset_from_key.html:21
#: meeting_transparency/templates/account/password_reset_from_key_done.html:8
msgid "Your password is now changed."
msgstr ""
#: meeting_transparency/templates/account/password_set.html:6
#: meeting_transparency/templates/account/password_set.html:9
#: meeting_transparency/templates/account/password_set.html:14
msgid "Set Password"
msgstr ""
#: meeting_transparency/templates/account/signup.html:6
msgid "Signup"
msgstr ""
#: meeting_transparency/templates/account/signup.html:9
#: meeting_transparency/templates/account/signup.html:19
#: meeting_transparency/templates/base.html:68
msgid "Sign Up"
msgstr ""
#: meeting_transparency/templates/account/signup.html:11
#, python-format
msgid ""
"Already have an account? Then please <a href=\"%(login_url)s\">sign in</a>."
msgstr ""
#: meeting_transparency/templates/account/signup_closed.html:5
#: meeting_transparency/templates/account/signup_closed.html:8
msgid "Sign Up Closed"
msgstr ""
#: meeting_transparency/templates/account/signup_closed.html:10
msgid "We are sorry, but the sign up is currently closed."
msgstr ""
#: meeting_transparency/templates/account/verification_sent.html:5
#: meeting_transparency/templates/account/verification_sent.html:8
#: meeting_transparency/templates/account/verified_email_required.html:5
#: meeting_transparency/templates/account/verified_email_required.html:8
msgid "Verify Your E-mail Address"
msgstr ""
#: meeting_transparency/templates/account/verification_sent.html:10
msgid ""
"We have sent an e-mail to you for verification. Follow the link provided to "
"finalize the signup process. Please contact us if you do not receive it "
"within a few minutes."
msgstr ""
#: meeting_transparency/templates/account/verified_email_required.html:12
msgid ""
"This part of the site requires us to verify that\n"
"you are who you claim to be. For this purpose, we require that you\n"
"verify ownership of your e-mail address. "
msgstr ""
#: meeting_transparency/templates/account/verified_email_required.html:16
msgid ""
"We have sent an e-mail to you for\n"
"verification. Please click on the link inside this e-mail. Please\n"
"contact us if you do not receive it within a few minutes."
msgstr ""
#: meeting_transparency/templates/account/verified_email_required.html:20
#, python-format
msgid ""
"<strong>Note:</strong> you can still <a href=\"%(email_url)s\">change your "
"e-mail address</a>."
msgstr ""
#: meeting_transparency/templates/base.html:58
msgid "My Profile"
msgstr ""
#: meeting_transparency/users/admin.py:18
msgid "Personal info"
msgstr ""
#: meeting_transparency/users/admin.py:20
msgid "Permissions"
msgstr ""
#: meeting_transparency/users/admin.py:31
msgid "Important dates"
msgstr ""
#: meeting_transparency/users/apps.py:7
msgid "Users"
msgstr ""
#: meeting_transparency/users/forms.py:23
#: meeting_transparency/users/tests/test_forms.py:41
msgid "This username has already been taken."
msgstr ""
#: meeting_transparency/users/models.py:15
msgid "Name of User"
msgstr ""
#: meeting_transparency/users/views.py:25
msgid "Information successfully updated"
msgstr ""
from django.contrib import admin from django.contrib import admin
from .models import *
# Register your models here. # Register your models here.
@admin.register(Meeting)
class MeetingAdmin(admin.ModelAdmin):
pass
@admin.register(Room)
class RoomAdmin(admin.ModelAdmin):
pass
@admin.register(Format)
class LocationAdmin(admin.ModelAdmin):
pass