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 ...@@ -270,7 +270,7 @@ Session.vim
tags tags
### Project template ### Project template
meeting_transparency committee_transparency
/media/ /media/
.pytest_cache/ .pytest_cache/
...@@ -5,7 +5,7 @@ stages: ...@@ -5,7 +5,7 @@ stages:
variables: variables:
POSTGRES_USER: 'django' POSTGRES_USER: 'django'
POSTGRES_PASSWORD: '' POSTGRES_PASSWORD: ''
POSTGRES_DB: 'test_asta_meeting_transparency_db' POSTGRES_DB: 'test_asta_committee_transparency_db'
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
......
...@@ -27,7 +27,7 @@ For convenience, you can keep your normal user logged in on Chrome and your supe ...@@ -27,7 +27,7 @@ For convenience, you can keep your normal user logged in on Chrome and your supe
Running type checks with mypy: Running type checks with mypy:
$ mypy meeting_transparency $ mypy committee_transparency
### Test coverage ### 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 ...@@ -8,8 +8,8 @@ from pathlib import Path
import environ import environ
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# meeting_transparency # committee_transparency
APPS_DIR = ROOT_DIR / "meeting_transparency" APPS_DIR = ROOT_DIR / "committee_transparency"
env = environ.Env() env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
...@@ -51,7 +51,7 @@ LOCALE_PATHS = [str(ROOT_DIR / "locale")] ...@@ -51,7 +51,7 @@ LOCALE_PATHS = [str(ROOT_DIR / "locale")]
DATABASES = { DATABASES = {
"default": env.db( "default": env.db(
"DATABASE_URL", "DATABASE_URL",
default="postgres:///meeting_transparency_db", default="postgres:///committee_transparency_db",
), ),
} }
DATABASES["default"]["ATOMIC_REQUESTS"] = True DATABASES["default"]["ATOMIC_REQUESTS"] = True
...@@ -80,18 +80,21 @@ DJANGO_APPS = [ ...@@ -80,18 +80,21 @@ DJANGO_APPS = [
] ]
THIRD_PARTY_APPS = [ THIRD_PARTY_APPS = [
"crispy_forms", "crispy_forms",
"crispy_bulma",
"simple_history", "simple_history",
"taggit", "taggit",
"djmoney", "djmoney",
"modeltranslation", "modeltranslation",
"rosetta" "rosetta",
"django_hosts",
"widget_tweaks",
] ]
LOCAL_APPS = [ LOCAL_APPS = [
"meeting_transparency.motions", "committee_transparency.motions",
"meeting_transparency.meetings", "committee_transparency.meetings",
"meeting_transparency.decisions", "committee_transparency.decisions",
"meeting_transparency.people", "committee_transparency.people",
# 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
...@@ -100,7 +103,7 @@ INSTALLED_APPS = THIRD_PARTY_APPS + DJANGO_APPS + LOCAL_APPS ...@@ -100,7 +103,7 @@ INSTALLED_APPS = THIRD_PARTY_APPS + DJANGO_APPS + LOCAL_APPS
# MIGRATIONS # MIGRATIONS
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules # 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 # AUTHENTICATION
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
...@@ -139,6 +142,7 @@ AUTH_PASSWORD_VALIDATORS = [ ...@@ -139,6 +142,7 @@ AUTH_PASSWORD_VALIDATORS = [
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#middleware # https://docs.djangoproject.com/en/dev/ref/settings/#middleware
MIDDLEWARE = [ MIDDLEWARE = [
"django_hosts.middleware.HostsRequestMiddleware",
"django.middleware.security.SecurityMiddleware", "django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware", "whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware", "django.contrib.sessions.middleware.SessionMiddleware",
...@@ -150,8 +154,15 @@ MIDDLEWARE = [ ...@@ -150,8 +154,15 @@ MIDDLEWARE = [
"django.middleware.common.BrokenLinkEmailsMiddleware", "django.middleware.common.BrokenLinkEmailsMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware",
"simple_history.middleware.HistoryRequestMiddleware", "simple_history.middleware.HistoryRequestMiddleware",
"django_hosts.middleware.HostsResponseMiddleware",
] ]
# Hosts
# ------------------------------------------------------------------------------
#
ROOT_HOSTCONF = 'config.hosts'
DEFAULT_HOST = 'default'
# STATIC # STATIC
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#static-root # https://docs.djangoproject.com/en/dev/ref/settings/#static-root
...@@ -195,7 +206,7 @@ TEMPLATES = [ ...@@ -195,7 +206,7 @@ TEMPLATES = [
"django.template.context_processors.static", "django.template.context_processors.static",
"django.template.context_processors.tz", "django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages", "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 = { ...@@ -267,3 +278,7 @@ LOGGING = {
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
TAGGIT_CASE_INSENSITIVE = True TAGGIT_CASE_INSENSITIVE = True
CURRENCIES = ('EUR',) CURRENCIES = ('EUR',)
CRISPY_ALLOWED_TEMPLATE_PACKS = ("bulma",)
CRISPY_TEMPLATE_PACK = "bulma"
...@@ -12,7 +12,12 @@ SECRET_KEY = env( ...@@ -12,7 +12,12 @@ SECRET_KEY = env(
) )
HASHID_FIELD_SALT = "oPWs3jsOgte5pcoM3PAvFzzZZ64Eox6anOI9HkSk5vaQrwRrazns7OT81TQbEpAy" HASHID_FIELD_SALT = "oPWs3jsOgte5pcoM3PAvFzzZZ64Eox6anOI9HkSk5vaQrwRrazns7OT81TQbEpAy"
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts # 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 # CACHES
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
......
...@@ -16,8 +16,9 @@ urlpatterns = [ ...@@ -16,8 +16,9 @@ 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('accounts/', include('django.contrib.auth.urls'), name='account'),
# 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)
......
...@@ -20,9 +20,9 @@ from pathlib import Path ...@@ -20,9 +20,9 @@ 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 directory. # committee_transparency 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 / "committee_transparency"))
# 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
# if running multiple sites in the same mod_wsgi process. To fix this, use # 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 # mod_wsgi daemon mode with each site in its own daemon process, or use
......
...@@ -27,300 +27,300 @@ msgstr "German" ...@@ -27,300 +27,300 @@ msgstr "German"
msgid "Englisch" msgid "Englisch"
msgstr "English" msgstr "English"
#: meeting_transparency/meetings/apps.py:6 #: committee_transparency/meetings/apps.py:6
#: meeting_transparency/meetings/models.py:151 #: committee_transparency/meetings/models.py:151
msgid "Sitzungen" msgid "Sitzungen"
msgstr "meetings" msgstr "meetings"
#: meeting_transparency/meetings/models.py:18 #: committee_transparency/meetings/models.py:18
#: meeting_transparency/meetings/models.py:148 #: committee_transparency/meetings/models.py:148
msgid "Legislaturperiode" msgid "Legislaturperiode"
msgstr "legislature period" msgstr "legislature period"
#: meeting_transparency/meetings/models.py:19 #: committee_transparency/meetings/models.py:19
msgid "Legislaturperioden" msgid "Legislaturperioden"
msgstr "legislature periods" msgstr "legislature periods"
#: meeting_transparency/meetings/models.py:50 #: committee_transparency/meetings/models.py:50
msgid "Videokonfenrenzraum" msgid "Videokonfenrenzraum"
msgstr "video conference room" msgstr "video conference room"
#: meeting_transparency/meetings/models.py:51 #: committee_transparency/meetings/models.py:51
msgid "Videokonfenrenzräume" msgid "Videokonfenrenzräume"
msgstr "video conference rooms" msgstr "video conference rooms"
#: meeting_transparency/meetings/models.py:63 #: committee_transparency/meetings/models.py:63
msgid "Raum" msgid "Raum"
msgstr "room" msgstr "room"
#: meeting_transparency/meetings/models.py:64 #: committee_transparency/meetings/models.py:64
msgid "Räume" msgid "Räume"
msgstr "rooms" msgstr "rooms"
#: meeting_transparency/meetings/models.py:74 #: committee_transparency/meetings/models.py:74
msgid "in Präsenz" msgid "in Präsenz"
msgstr "in person" msgstr "in person"
#: meeting_transparency/meetings/models.py:75 #: committee_transparency/meetings/models.py:75
msgid "Online" msgid "Online"
msgstr "online" msgstr "online"
#: meeting_transparency/meetings/models.py:76 #: committee_transparency/meetings/models.py:76
msgid "Hybrid" msgid "Hybrid"
msgstr "hybrid" msgstr "hybrid"
#: meeting_transparency/meetings/models.py:91 #: committee_transparency/meetings/models.py:91
#: meeting_transparency/meetings/models.py:144 #: committee_transparency/meetings/models.py:144
msgid "Format" msgid "Format"
msgstr "format" msgstr "format"
#: meeting_transparency/meetings/models.py:92 #: committee_transparency/meetings/models.py:92
msgid "Formate" msgid "Formate"
msgstr "formats" msgstr "formats"
#: meeting_transparency/meetings/models.py:113 #: committee_transparency/meetings/models.py:113
#: meeting_transparency/meetings/models.py:127 #: committee_transparency/meetings/models.py:127
msgid "Unbekanntes Sitzungsformat" msgid "Unbekanntes Sitzungsformat"
msgstr "unknown meeting format" msgstr "unknown meeting format"
#: meeting_transparency/meetings/models.py:135 #: committee_transparency/meetings/models.py:135
msgid "Versandzeitpunkt der ersten Sitzungseinladung" msgid "Versandzeitpunkt der ersten Sitzungseinladung"
msgstr "mailing date of the first meeting invitation" 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" msgid "Versandzeitpunkt der letzten Sitzungseinladung"
msgstr "mailing date of the last meeting invitation" msgstr "mailing date of the last meeting invitation"
#: meeting_transparency/meetings/models.py:150 #: committee_transparency/meetings/models.py:150
msgid "Sitzung" msgid "Sitzung"
msgstr "meeting" msgstr "meeting"
#: meeting_transparency/motions/apps.py:6 #: committee_transparency/motions/apps.py:6
#: meeting_transparency/motions/models.py:42 #: committee_transparency/motions/models.py:42
msgid "Anträge" msgid "Anträge"
msgstr "motions" msgstr "motions"
#: meeting_transparency/motions/models.py:18 #: committee_transparency/motions/models.py:18
msgid "Entwurf" msgid "Entwurf"
msgstr "draft" msgstr "draft"
#: meeting_transparency/motions/models.py:18 #: committee_transparency/motions/models.py:18
msgid "offen" msgid "offen"
msgstr "open" msgstr "open"
#: meeting_transparency/motions/models.py:18 #: committee_transparency/motions/models.py:18
msgid "vertagt" msgid "vertagt"
msgstr "adjourned" msgstr "adjourned"
#: meeting_transparency/motions/models.py:18 #: committee_transparency/motions/models.py:18
msgid "zurückgezogen" msgid "zurückgezogen"
msgstr "withdrawn" msgstr "withdrawn"
#: meeting_transparency/motions/models.py:25 #: committee_transparency/motions/models.py:25
msgid "Titel" msgid "Titel"
msgstr "title" msgstr "title"
#: meeting_transparency/motions/models.py:28 #: committee_transparency/motions/models.py:28
msgid "Text" msgid "Text"
msgstr "text" msgstr "text"
#: meeting_transparency/motions/models.py:30 #: committee_transparency/motions/models.py:30
msgid "anhänge" msgid "anhänge"
msgstr "attachements" msgstr "attachements"
#: meeting_transparency/motions/models.py:37 #: committee_transparency/motions/models.py:37
msgid "Schlagwörter" msgid "Schlagwörter"
msgstr "tags" msgstr "tags"
#: meeting_transparency/motions/models.py:41 #: committee_transparency/motions/models.py:41
msgid "Antrag" msgid "Antrag"
msgstr "motion" msgstr "motion"
#: meeting_transparency/motions/models.py:54 #: committee_transparency/motions/models.py:54
msgid "Finanzantrag" msgid "Finanzantrag"
msgstr "financial request" msgstr "financial request"
#: meeting_transparency/motions/models.py:55 #: committee_transparency/motions/models.py:55
msgid "Finanzanträge" msgid "Finanzanträge"
msgstr "finacial requests" msgstr "finacial requests"
#: meeting_transparency/templates/account/account_inactive.html:5 #: committee_transparency/templates/account/account_inactive.html:5
#: meeting_transparency/templates/account/account_inactive.html:8 #: committee_transparency/templates/account/account_inactive.html:8
msgid "Account Inactive" msgid "Account Inactive"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/account_inactive.html:10 #: committee_transparency/templates/account/account_inactive.html:10
msgid "This account is inactive." msgid "This account is inactive."
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:7 #: committee_transparency/templates/account/email.html:7
msgid "Account" msgid "Account"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:10 #: committee_transparency/templates/account/email.html:10
msgid "E-mail Addresses" msgid "E-mail Addresses"
msgstr "" 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:" msgid "The following e-mail addresses are associated with your account:"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:27 #: committee_transparency/templates/account/email.html:27
msgid "Verified" msgid "Verified"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:29 #: committee_transparency/templates/account/email.html:29
msgid "Unverified" msgid "Unverified"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:31 #: committee_transparency/templates/account/email.html:31
msgid "Primary" msgid "Primary"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:37 #: committee_transparency/templates/account/email.html:37
msgid "Make Primary" msgid "Make Primary"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:38 #: committee_transparency/templates/account/email.html:38
msgid "Re-send Verification" msgid "Re-send Verification"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:39 #: committee_transparency/templates/account/email.html:39
msgid "Remove" msgid "Remove"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:46 #: committee_transparency/templates/account/email.html:46
msgid "Warning:" msgid "Warning:"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:46 #: committee_transparency/templates/account/email.html:46
msgid "" msgid ""
"You currently do not have any e-mail address set up. You should really add " "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, " "an e-mail address so you can receive notifications, reset your password, "
"etc." "etc."
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:51 #: committee_transparency/templates/account/email.html:51
msgid "Add E-mail Address" msgid "Add E-mail Address"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email.html:56 #: committee_transparency/templates/account/email.html:56
msgid "Add E-mail" msgid "Add E-mail"
msgstr "" 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?" msgid "Do you really want to remove the selected e-mail address?"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:6 #: committee_transparency/templates/account/email_confirm.html:6
#: meeting_transparency/templates/account/email_confirm.html:10 #: committee_transparency/templates/account/email_confirm.html:10
msgid "Confirm E-mail Address" msgid "Confirm E-mail Address"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:16 #: committee_transparency/templates/account/email_confirm.html:16
#, python-format #, python-format
msgid "" msgid ""
"Please confirm that <a href=\"mailto:%(email)s\">%(email)s</a> is an e-mail " "Please confirm that <a href=\"mailto:%(email)s\">%(email)s</a> is an e-mail "
"address for user %(user_display)s." "address for user %(user_display)s."
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:20 #: committee_transparency/templates/account/email_confirm.html:20
msgid "Confirm" msgid "Confirm"
msgstr "" msgstr ""
#: meeting_transparency/templates/account/email_confirm.html:27 #: committee_transparency/templates/account/email_confirm.html:27
#, python-format #, python-format
msgid "" msgid ""
"This e-mail confirmation link expired or is invalid. Please <a " "This e-mail confirmation link expired or is invalid. Please <a "
"href=\"%(email_url)s\">issue a new e-mail confirmation request</a>." "href=\"%(email_url)s\">issue a new e-mail confirmation request</a>."
msgstr "" msgstr ""
#: meeting_transparency/templates/account/login.html:7 #: committee_transparency/templates/account/login.html:7
#: meeting_transparency/templates/account/login.html:11 #: committee_transparency/templates/account/login.html:11