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

added motions app

parent 8ff92712
Pipeline #141784 failed with stages
in 8 seconds
......@@ -270,6 +270,7 @@ Session.vim
tags
### Project template
asta_administration/media/
meeting_transparency
/media/
.pytest_cache/
......@@ -27,7 +27,8 @@ For convenience, you can keep your normal user logged in on Chrome and your supe
Running type checks with mypy:
$ mypy asta_administration
$ mypy meeting_transparency
### Test coverage
......
......@@ -6,8 +6,8 @@ from pathlib import Path
import environ
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# asta_administration/
APPS_DIR = ROOT_DIR / "asta_administration"
# meeting_transparency
APPS_DIR = ROOT_DIR / "meeting_transparency"
env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
......@@ -44,7 +44,7 @@ LOCALE_PATHS = [str(ROOT_DIR / "locale")]
DATABASES = {
"default": env.db(
"DATABASE_URL",
default="postgres:///asta_administration",
default="postgres:///meeting_transparency_db",
),
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
......@@ -76,7 +76,7 @@ THIRD_PARTY_APPS = [
]
LOCAL_APPS = [
"asta_administration.users",
"meeting_transparency.users",
# Your stuff: custom apps go here
]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
......@@ -85,7 +85,7 @@ INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
# MIGRATIONS
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules
MIGRATION_MODULES = {"sites": "asta_administration.contrib.sites.migrations"}
MIGRATION_MODULES = {"sites": "meeting_transparency.contrib.sites.migrations"}
# AUTHENTICATION
# ------------------------------------------------------------------------------
......@@ -180,7 +180,7 @@ TEMPLATES = [
"django.template.context_processors.static",
"django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages",
# "asta_administration.users.context_processors.allauth_settings",
# "meeting_transparency.users.context_processors.allauth_settings",
],
},
}
......
......@@ -13,7 +13,7 @@ from .base import env
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env("DJANGO_SECRET_KEY")
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["verwaltung.asta.tuhh.de"])
ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["sitzung.asta.tuhh.de, antrag.asta.tuhh.de, beschluss.asta.tuhh.de"])
# DATABASES
# ------------------------------------------------------------------------------
......@@ -72,7 +72,7 @@ STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
# https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
DEFAULT_FROM_EMAIL = env(
"DJANGO_DEFAULT_FROM_EMAIL",
default="AStA Verwaltung <no-reply@asta.tuhh.de>",
default="AStA Anträge/Sitzungen/Beschlüsse <no-reply@tuhh.de>",
)
# https://docs.djangoproject.com/en/dev/ref/settings/#server-email
SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
......
......@@ -13,7 +13,7 @@ urlpatterns = [
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
# User management
path("users/", include("asta_administration.users.urls", namespace="users")),
path("users/", include("meeting_tranparency.users.urls", namespace="users")),
# Your stuff: custom urls includes go here
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
......
......@@ -20,9 +20,10 @@ from pathlib import Path
from django.core.wsgi import get_wsgi_application
# This allows easy placement of apps within the interior
# asta_administration directory.
# meeting_transparency
directory.
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent
sys.path.append(str(ROOT_DIR / "asta_administration"))
sys.path.append(str(ROOT_DIR / "meeting_tranparency"))
# 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
......
......@@ -24,7 +24,7 @@ if __name__ == "__main__":
raise
# This allows easy placement of apps within the interior
# asta_administration directory.
# meeting_transparency directory.
current_path = Path(__file__).parent.resolve()
sys.path.append(str(current_path / "meeting_tranparency"))
......
import pytest
from asta_administration.users.models import User
from asta_administration.users.tests.factories import UserFactory
from meeting_transparency
.users.models import User
from meeting_transparency
.users.tests.factories import UserFactory
@pytest.fixture(autouse=True)
......
from django.db import models
# Create your models here.
class decision
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class FinanceConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'finance'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.shortcuts import render
# Create your views here.
......@@ -3,7 +3,7 @@ from django.contrib.auth import admin as auth_admin
from django.contrib.auth import get_user_model
from django.utils.translation import gettext_lazy as _
from asta_administration.users.forms import UserAdminChangeForm, UserAdminCreationForm
from meeting_transparency.users.forms import UserAdminChangeForm, UserAdminCreationForm
User = get_user_model()
......
......@@ -3,11 +3,11 @@ from django.utils.translation import gettext_lazy as _
class UsersConfig(AppConfig):
name = "asta_administration.users"
name = "meeting_transparency.users"
verbose_name = _("Users")
def ready(self):
try:
import asta_administration.users.signals # noqa F401
import meeting_transparency.users.signals # noqa F401
except ImportError:
pass
import pytest
from django.urls import reverse
from asta_administration.users.models import User
from meeting_transparency
.users.models import User
pytestmark = pytest.mark.django_db
......
......@@ -4,8 +4,10 @@ Module for all Form Tests.
import pytest
from django.utils.translation import gettext_lazy as _
from asta_administration.users.forms import UserAdminCreationForm
from asta_administration.users.models import User
from meeting_transparency
.users.forms import UserAdminCreationForm
from meeting_transparency
.users.models import User
pytestmark = pytest.mark.django_db
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment