Unverified Commit f15fede5 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Never import thaliawebsite.settings directly

parent 73fa3a39
from django.conf import settings
from django.templatetags.static import static
from django.urls import reverse
from django.utils import timezone
......@@ -11,7 +12,6 @@ from events import services
from events.exceptions import RegistrationError
from events.models import Event, Registration, RegistrationInformationField
from pizzas.models import PizzaEvent
from thaliawebsite import settings
from thaliawebsite.templatetags.bleach_tags import bleach
......
from django.conf import settings
from django.core import validators
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.db import models
......@@ -8,7 +9,6 @@ from django.utils.translation import ugettext_lazy as _
from django.utils.text import format_lazy
from tinymce.models import HTMLField
from thaliawebsite import settings
from utils.translation import ModelTranslateMeta, MultilingualField
......
from rest_framework import permissions
from django.conf import settings
from thaliawebsite import settings
from rest_framework import permissions
class MailingListPermission(permissions.BasePermission):
......
from django.conf import settings
from django.utils import timezone
from activemembers.models import CommitteeMembership, Mentorship
from members.models import Member
from thaliawebsite import settings
from utils.snippets import datetime_to_lectureyear
......
from django.conf import settings
from datetime import timedelta
from django.core import mail
......@@ -8,7 +9,6 @@ from django.utils.translation import ugettext as _
from django.template.defaultfilters import floatformat
from members.models import Member
from thaliawebsite import settings
def send_membership_announcement(dry_run=False):
......
"""The emails defined by the newsletters package"""
from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.utils import translation
from members.models import Member
from partners.models import Partner
from thaliawebsite import settings
def send_newsletter(request, newsletter):
......
import datetime
from django.conf import settings
from django.core.mail import EmailMessage
from django.utils import timezone
from partners.models import Vacancy
from thaliawebsite import settings
def send_vacancy_expiration_notifications(dry_run=False):
......
from __future__ import unicode_literals
from django.conf import settings as django_settings
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import override
from pyfcm import FCMNotification
from thaliawebsite import settings
from utils.translation import MultilingualField, ModelTranslateMeta
......@@ -39,7 +38,7 @@ class Device(models.Model):
verbose_name=_("active"), default=True,
help_text=_("Inactive devices will not be sent notifications")
)
user = models.ForeignKey(django_settings.AUTH_USER_MODEL,
user = models.ForeignKey(settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
blank=False,
null=False)
......@@ -81,7 +80,7 @@ class Message(models.Model, metaclass=ModelTranslateMeta):
(BOARD, _("Board")),
)
users = models.ManyToManyField(django_settings.AUTH_USER_MODEL)
users = models.ManyToManyField(settings.AUTH_USER_MODEL)
title = MultilingualField(
models.CharField,
max_length=150,
......
"""The emails defined by the registrations package"""
from django.conf import settings
from django.core import mail
from django.template import loader
from django.template.defaultfilters import floatformat
......@@ -6,7 +7,6 @@ from django.urls import reverse
from django.utils import translation
from django.utils.translation import ugettext_lazy as _
from thaliawebsite import settings
from . import models
......
"""The models defined by the registrations package"""
import uuid
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core import validators
from django.core.exceptions import ValidationError
......@@ -9,8 +10,7 @@ from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from members.models import Membership, Profile
from thaliawebsite import settings
from . import emails
from registrations import emails
class Entry(models.Model):
......
......@@ -3,6 +3,7 @@ import string
import unicodedata
from datetime import timedelta
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db.models import Q
from django.utils import timezone
......@@ -10,10 +11,9 @@ from django.utils import timezone
import members
from members.models import Membership, Profile
from payments.models import Payment
from thaliawebsite import settings
from utils.snippets import datetime_to_lectureyear
from . import emails
from .models import Entry, Registration, Renewal
from registrations import emails
from registrations.models import Entry, Registration, Renewal
def _generate_username(registration):
......
import uuid
from unittest import mock
from django.conf import settings
from django.core import mail
from django.template import loader
from django.template.defaultfilters import floatformat
......@@ -14,7 +15,6 @@ from payments.models import Payment
from registrations import emails
from registrations.emails import _send_email
from registrations.models import Registration, Renewal
from thaliawebsite import settings
class EmailsTest(TestCase):
......
from datetime import timedelta
from unittest import mock
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core import mail
from django.test import TestCase
......@@ -11,7 +12,6 @@ from members.models import Member, Membership
from payments.models import Payment
from registrations import services
from registrations.models import Entry, Registration, Renewal
from thaliawebsite import settings
from utils.snippets import datetime_to_lectureyear
......
from unittest import mock
from unittest.mock import MagicMock, Mock
from django.conf import settings
from django.contrib import messages
from django.contrib.admin.utils import model_ngettext
from django.contrib.auth import get_user_model
......@@ -18,7 +19,6 @@ from members.models import Membership
from registrations import views
from registrations.models import Entry, Registration, Renewal
from registrations.views import RenewalFormView
from thaliawebsite import settings
def _get_mock_request(method='GET', is_staff=False,
......
"""Views provided by the registrations package"""
from django.conf import settings
from django.contrib import messages
from django.contrib.admin.utils import model_ngettext
from django.contrib.admin.views.decorators import staff_member_required
......@@ -16,7 +17,6 @@ from django.views.generic import FormView
from django.views.generic.base import TemplateResponseMixin, TemplateView
from members.models import Membership
from thaliawebsite import settings
from . import emails, forms, services
from .models import Entry, Registration, Renewal
......
from thaliawebsite import settings
from django.conf import settings
from utils.templatetags.thumbnail import thumbnail
......
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