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

added tag input

parent 4a347884
Pipeline #146447 failed with stages
in 13 seconds
......@@ -270,7 +270,7 @@ Session.vim
tags
### Project template
meeting_transparency
committee_transparency
/media/
.pytest_cache/
......@@ -5,7 +5,7 @@ stages:
variables:
POSTGRES_USER: 'django'
POSTGRES_PASSWORD: ''
POSTGRES_DB: 'test_asta_meeting_transparency_db'
POSTGRES_DB: 'test_asta_committee_transparency_db'
POSTGRES_HOST_AUTH_METHOD: trust
......
......@@ -27,7 +27,7 @@ For convenience, you can keep your normal user logged in on Chrome and your supe
Running type checks with mypy:
$ mypy meeting_transparency
$ mypy committee_transparency
### Test coverage
......
from django.conf import settings
from django_hosts import patterns, host
app_name = 'motion'
host_patterns = patterns('committee_transparency',
host('antrag', 'motions.urls' , name="motion"),
host('beschluesse', 'motions.urls' , name="decisions"),
host('sitzung', 'motions.urls' , name="meeting")
)
host_patterns += patterns('',
host('verwaltung', settings.ROOT_URLCONF, name='default'),
)
......@@ -8,8 +8,8 @@ from pathlib import Path
import environ
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# meeting_transparency
APPS_DIR = ROOT_DIR / "meeting_transparency"
# committee_transparency
APPS_DIR = ROOT_DIR / "committee_transparency"
env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
......@@ -51,7 +51,7 @@ LOCALE_PATHS = [str(ROOT_DIR / "locale")]
DATABASES = {
"default": env.db(
"DATABASE_URL",
default="postgres:///meeting_transparency_db",
default="postgres:///committee_transparency_db",
),
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
......@@ -80,18 +80,21 @@ DJANGO_APPS = [
]
THIRD_PARTY_APPS = [
"crispy_forms",
"crispy_bulma",
"simple_history",
"taggit",
"djmoney",
"modeltranslation",
"rosetta"
"rosetta",
"django_hosts",
"widget_tweaks",
]
LOCAL_APPS = [
"meeting_transparency.motions",
"meeting_transparency.meetings",
"meeting_transparency.decisions",
"meeting_transparency.people",
"committee_transparency.motions",
"committee_transparency.meetings",
"committee_transparency.decisions",
"committee_transparency.people",
# Your stuff: custom apps go here
]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
......@@ -100,7 +103,7 @@ INSTALLED_APPS = THIRD_PARTY_APPS + DJANGO_APPS + LOCAL_APPS
# MIGRATIONS
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules
MIGRATION_MODULES = {"sites": "meeting_transparency.contrib.sites.migrations"}
MIGRATION_MODULES = {"sites": "committee_transparency.contrib.sites.migrations"}
# AUTHENTICATION
# ------------------------------------------------------------------------------
......@@ -139,6 +142,7 @@ AUTH_PASSWORD_VALIDATORS = [
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#middleware
MIDDLEWARE = [
"django_hosts.middleware.HostsRequestMiddleware",
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
......@@ -150,8 +154,15 @@ MIDDLEWARE = [
"django.middleware.common.BrokenLinkEmailsMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"simple_history.middleware.HistoryRequestMiddleware",
"django_hosts.middleware.HostsResponseMiddleware",
]
# Hosts
# ------------------------------------------------------------------------------
#
ROOT_HOSTCONF = 'config.hosts'
DEFAULT_HOST = 'default'
# STATIC
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#static-root
......@@ -195,7 +206,7 @@ TEMPLATES = [
"django.template.context_processors.static",
"django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages",
# "meeting_transparency.users.context_processors.allauth_settings",
# "committee_transparency.users.context_processors.allauth_settings",
],
},
}
......@@ -267,3 +278,7 @@ LOGGING = {
# ------------------------------------------------------------------------------
TAGGIT_CASE_INSENSITIVE = True
CURRENCIES = ('EUR',)
CRISPY_ALLOWED_TEMPLATE_PACKS = ("bulma",)
CRISPY_TEMPLATE_PACK = "bulma"
......@@ -12,7 +12,12 @@ SECRET_KEY = env(
)
HASHID_FIELD_SALT = "oPWs3jsOgte5pcoM3PAvFzzZZ64Eox6anOI9HkSk5vaQrwRrazns7OT81TQbEpAy"
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"]
ALLOWED_HOSTS = ["localhost",
"verwaltung.localhost",
"antrag.localhost",
"beschluesse.localhost",
"sitzung.localhost",
"0.0.0.0", "127.0.0.1"]
# CACHES
# ------------------------------------------------------------------------------
......
......@@ -16,8 +16,9 @@ urlpatterns = [
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
# User management
#path("users/", include("meeting_tranparency.users.urls", namespace="users")),
path('accounts/', include('django.contrib.auth.urls'), name='account'),
# Your stuff: custom urls includes go here
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
......
......@@ -20,9 +20,9 @@ from pathlib import Path
from django.core.wsgi import get_wsgi_application
# This allows easy placement of apps within the interior
# meeting_transparency directory.
# committee_transparency directory.
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent
sys.path.append(str(ROOT_DIR / "meeting_tranparency"))
sys.path.append(str(ROOT_DIR / "committee_transparency"))
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
......
......@@ -27,300 +27,300 @@ msgstr "German"
msgid "Englisch"
msgstr "English"
#: meeting_transparency/meetings/apps.py:6
#: meeting_transparency/meetings/models.py:151
#: committee_transparency/meetings/apps.py:6
#: committee_transparency/meetings/models.py:151
msgid "Sitzungen"
msgstr "meetings"
#: meeting_transparency/meetings/models.py:18
#: meeting_transparency/meetings/models.py:148
#: committee_transparency/meetings/models.py:18
#: committee_transparency/meetings/models.py:148
msgid "Legislaturperiode"
msgstr "legislature period"
#: meeting_transparency/meetings/models.py:19
#: committee_transparency/meetings/models.py:19
msgid "Legislaturperioden"
msgstr "legislature periods"
#: meeting_transparency/meetings/models.py:50
#: committee_transparency/meetings/models.py:50
msgid "Videokonfenrenzraum"
msgstr "video conference room"
#: meeting_transparency/meetings/models.py:51
#: committee_transparency/meetings/models.py:51
msgid "Videokonfenrenzräume"
msgstr "video conference rooms"
#: meeting_transparency/meetings/models.py:63
#: committee_transparency/meetings/models.py:63
msgid "Raum"
msgstr "room"
#: meeting_transparency/meetings/models.py:64
#: committee_transparency/meetings/models.py:64
msgid "Räume"
msgstr "rooms"
#: meeting_transparency/meetings/models.py:74
#: committee_transparency/meetings/models.py:74
msgid "in Präsenz"
msgstr "in person"
#: meeting_transparency/meetings/models.py:75
#: committee_transparency/meetings/models.py:75
msgid "Online"
msgstr "online"
#: meeting_transparency/meetings/models.py:76
#: committee_transparency/meetings/models.py:76
msgid "Hybrid"
msgstr "hybrid"
#: meeting_transparency/meetings/models.py:91
#: meeting_transparency/meetings/models.py:144
#: committee_transparency/meetings/models.py:91
#: committee_transparency/meetings/models.py:144
msgid "Format"
msgstr "format"
#: meeting_transparency/meetings/models.py:92
#: committee_transparency/meetings/models.py:92
msgid "Formate"
msgstr "formats"
#: meeting_transparency/meetings/models.py:113
#: meeting_transparency/meetings/models.py:127
#: committee_transparency/meetings/models.py:113
#: committee_transparency/meetings/models.py:127
msgid "Unbekanntes Sitzungsformat"
msgstr "unknown meeting format"
#: meeting_transparency/meetings/models.py:135
#: committee_transparency/meetings/models.py:135
msgid "Versandzeitpunkt der ersten Sitzungseinladung"
msgstr "mailing date of the first meeting invitation"
#: meeting_transparency/meetings/models.py:138
#: committee_transparency/meetings/models.py:138
msgid "Versandzeitpunkt der letzten Sitzungseinladung"
msgstr "mailing date of the last meeting invitation"
#: meeting_transparency/meetings/models.py:150
#: committee_transparency/meetings/models.py:150
msgid "Sitzung"
msgstr "meeting"
#: meeting_transparency/motions/apps.py:6
#: meeting_transparency/motions/models.py:42
#: committee_transparency/motions/apps.py:6
#: committee_transparency/motions/models.py:42
msgid "Anträge"
msgstr "motions"
#: meeting_transparency/motions/models.py:18
#: committee_transparency/motions/models.py:18
msgid "Entwurf"
msgstr "draft"
#: meeting_transparency/motions/models.py:18
#: committee_transparency/motions/models.py:18
msgid "offen"
msgstr "open"
#: meeting_transparency/motions/models.py:18
#: committee_transparency/motions/models.py:18
msgid "vertagt"
msgstr "adjourned"
#: meeting_transparency/motions/models.py:18
#: committee_transparency/motions/models.py:18
msgid "zurückgezogen"
msgstr "withdrawn"
#: meeting_transparency/motions/models.py:25
#: committee_transparency/motions/models.py:25
msgid "Titel"
msgstr "title"
#: meeting_transparency/motions/models.py:28
#: committee_transparency/motions/models.py:28
msgid "Text"
msgstr "text"
#: meeting_transparency/motions/models.py:30
#: committee_transparency/motions/models.py:30
msgid "anhänge"
msgstr "attachements"
#: meeting_transparency/motions/models.py:37
#: committee_transparency/motions/models.py:37
msgid "Schlagwörter"
msgstr "tags"
#: meeting_transparency/motions/models.py:41
#: committee_transparency/motions/models.py:41
msgid "Antrag"
msgstr "motion"
#: meeting_transparency/motions/models.py:54
#: committee_transparency/motions/models.py:54
msgid "Finanzantrag"
msgstr "financial request"
#: meeting_transparency/motions/models.py:55
#: committee_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
#: committee_transparency/templates/account/account_inactive.html:5
#: committee_transparency/templates/account/account_inactive.html:8
msgid "Account Inactive"
msgstr ""
#: meeting_transparency/templates/account/account_inactive.html:10
#: committee_transparency/templates/account/account_inactive.html:10
msgid "This account is inactive."
msgstr ""
#: meeting_transparency/templates/account/email.html:7
#: committee_transparency/templates/account/email.html:7
msgid "Account"
msgstr ""
#: meeting_transparency/templates/account/email.html:10
#: committee_transparency/templates/account/email.html:10
msgid "E-mail Addresses"
msgstr ""
#: meeting_transparency/templates/account/email.html:13
#: committee_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
#: committee_transparency/templates/account/email.html:27
msgid "Verified"
msgstr ""
#: meeting_transparency/templates/account/email.html:29
#: committee_transparency/templates/account/email.html:29
msgid "Unverified"
msgstr ""
#: meeting_transparency/templates/account/email.html:31
#: committee_transparency/templates/account/email.html:31
msgid "Primary"
msgstr ""
#: meeting_transparency/templates/account/email.html:37
#: committee_transparency/templates/account/email.html:37
msgid "Make Primary"
msgstr ""
#: meeting_transparency/templates/account/email.html:38
#: committee_transparency/templates/account/email.html:38
msgid "Re-send Verification"
msgstr ""
#: meeting_transparency/templates/account/email.html:39
#: committee_transparency/templates/account/email.html:39
msgid "Remove"
msgstr ""
#: meeting_transparency/templates/account/email.html:46
#: committee_transparency/templates/account/email.html:46
msgid "Warning:"
msgstr ""
#: meeting_transparency/templates/account/email.html:46
#: committee_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
#: committee_transparency/templates/account/email.html:51
msgid "Add E-mail Address"
msgstr ""
#: meeting_transparency/templates/account/email.html:56
#: committee_transparency/templates/account/email.html:56
msgid "Add E-mail"
msgstr ""
#: meeting_transparency/templates/account/email.html:66
#: committee_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
#: committee_transparency/templates/account/email_confirm.html:6
#: committee_transparency/templates/account/email_confirm.html:10
msgid "Confirm E-mail Address"
msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:16
#: committee_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
#: committee_transparency/templates/account/email_confirm.html:20
msgid "Confirm"
msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:27
#: committee_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
#: committee_transparency/templates/account/login.html:7
#: committee_transparency/templates/account/login.html:11
#: committee_transparency/templates/account/login.html:56
#: committee_transparency/templates/base.html:73
msgid "Sign In"
msgstr ""
#: meeting_transparency/templates/account/login.html:17
#: committee_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
#: committee_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
#: committee_transparency/templates/account/login.html:32
msgid "or"
msgstr ""
#: meeting_transparency/templates/account/login.html:41
#: committee_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
#: committee_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
#: committee_transparency/templates/account/logout.html:5
#: committee_transparency/templates/account/logout.html:8
#: committee_transparency/templates/account/logout.html:17
#: committee_transparency/templates/base.html:62
msgid "Sign Out"
msgstr ""
#: meeting_transparency/templates/account/logout.html:10
#: committee_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
#: committee_transparency/templates/account/password_change.html:6
#: committee_transparency/templates/account/password_change.html:9
#: committee_transparency/templates/account/password_change.html:14
#: committee_transparency/templates/account/password_reset_from_key.html:5
#: committee_transparency/templates/account/password_reset_from_key.html:8
#: committee_transparency/templates/account/password_reset_from_key_done.html:4
#: committee_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
#: committee_transparency/templates/account/password_reset.html:7
#: committee_transparency/templates/account/password_reset.html:11
#: committee_transparency/templates/account/password_reset_done.html:6
#: committee_transparency/templates/account/password_reset_done.html:9
msgid "Password Reset"
msgstr ""
#: meeting_transparency/templates/account/password_reset.html:16
#: committee_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
#: committee_transparency/templates/account/password_reset.html:21
msgid "Reset My Password"
msgstr ""
#: meeting_transparency/templates/account/password_reset.html:24
#: committee_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
#: committee_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
#: committee_transparency/templates/account/password_reset_from_key.html:8
msgid "Bad Token"
msgstr ""
#: meeting_transparency/templates/account/password_reset_from_key.html:12
#: committee_transparency/templates/account/password_reset_from_key.html:12
#, python-format
msgid ""
"The password reset link was invalid, possibly because it has already been "
......@@ -328,110 +328,110 @@ msgid ""
"reset</a>."
msgstr ""
#: meeting_transparency/templates/account/password_reset_from_key.html:18
#: committee_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
#: committee_transparency/templates/account/password_reset_from_key.html:21
#: committee_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
#: committee_transparency/templates/account/password_set.html:6
#: committee_transparency/templates/account/password_set.html:9
#: committee_transparency/templates/account/password_set.html:14
msgid "Set Password"
msgstr ""
#: meeting_transparency/templates/account/signup.html:6
#: committee_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
#: committee_transparency/templates/account/signup.html:9
#: committee_transparency/templates/account/signup.html:19
#: committee_transparency/templates/base.html:68
msgid "Sign Up"
msgstr ""
#: meeting_transparency/templates/account/signup.html:11
#: committee_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
#: committee_transparency/templates/account/signup_closed.html:5
#: committee_transparency/templates/account/signup_closed.html:8
msgid "Sign Up Closed"
msgstr ""
#: meeting_transparency/templates/account/signup_closed.html:10
#: committee_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
#: committee_transparency/templates/account/verification_sent.html:5
#: committee_transparency/templates/account/verification_sent.html:8
#: committee_transparency/templates/account/verified_email_required.html:5
#: committee_transparency/templates/account/verified_email_required.html:8
msgid "Verify Your E-mail Address"
msgstr ""
#: meeting_transparency/templates/account/verification_sent.html:10
#: committee_transparency/templates/account/verification_sent.html:10