Commit 8c3c53e9 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg

Merge branch 'registrations-code-smell' into 'master'

Clean up registrations code smell

See merge request !675
parents da7c5aa1 5b0a9879
......@@ -3,8 +3,7 @@ from django.contrib.admin.utils import model_ngettext
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from registrations import services
from . import services
from .models import Entry, Payment, Registration, Renewal
......
......@@ -5,9 +5,10 @@ from django.urls import reverse
from django.utils import translation
from django.utils.translation import ugettext_lazy as _
from registrations import models
from thaliawebsite.settings import settings
from . import models
def send_registration_email_confirmation(registration):
with translation.override(registration.language):
......
......@@ -2,7 +2,7 @@ from django import forms
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from registrations.models import Registration, Renewal
from .models import Registration, Renewal
class MemberRegistrationForm(forms.ModelForm):
......
......@@ -10,9 +10,10 @@ from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from members.models import Membership, Profile
from registrations import emails
from thaliawebsite.settings import settings
from . import emails
class Entry(models.Model):
......
......@@ -8,10 +8,10 @@ from django.utils import timezone
import members
from members.models import Membership, Profile
from registrations import emails
from thaliawebsite.settings import settings
from utils.snippets import datetime_to_lectureyear
from . import emails
from .models import Entry, Payment, Registration, Renewal
......
......@@ -16,8 +16,6 @@ from thaliawebsite.settings import settings
class EmailsTest(TestCase):
def test_board_notification_address(self):
self.assertEqual(settings.BOARD_NOTIFICATION_ADDRESS, 'info@thalia.nu')
@mock.patch('registrations.emails._send_email')
def test_send_registration_email_confirmation(self, send_email):
......
from django.conf.urls import url
from django.views.generic import TemplateView
from registrations.views import (BecomeAMemberView, ConfirmEmailView,
EntryAdminView, MemberRegistrationFormView,
PaymentAdminView, RenewalFormView)
from .views import (BecomeAMemberView, ConfirmEmailView,
EntryAdminView, MemberRegistrationFormView,
PaymentAdminView, RenewalFormView)
app_name = "registrations"
......
......@@ -15,10 +15,11 @@ from django.views.generic import FormView
from django.views.generic.base import TemplateResponseMixin, TemplateView
from members.models import Membership
from registrations import emails, forms, services
from registrations.models import Entry, Payment, Registration, Renewal
from thaliawebsite.settings import settings
from . import emails, forms, services
from .models import Entry, Payment, Registration, Renewal
class BecomeAMemberView(TemplateView):
template_name = 'registrations/become_a_member.html'
......
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