diff --git a/src/fellchensammlung/forms.py b/src/fellchensammlung/forms.py index 2d998cb..b6e7113 100644 --- a/src/fellchensammlung/forms.py +++ b/src/fellchensammlung/forms.py @@ -1,5 +1,5 @@ from django import forms -from .models import AdoptionNotice, Animal, Image, Report, ModerationAction +from .models import AdoptionNotice, Animal, Image, Report, ModerationAction, User from django_registration.forms import RegistrationForm @@ -45,4 +45,5 @@ class ModerationActionForm(forms.ModelForm): class CustomRegistrationForm(RegistrationForm): - pass + class Meta(RegistrationForm.Meta): + model = User diff --git a/src/fellchensammlung/urls.py b/src/fellchensammlung/urls.py index 13289be..010e14f 100644 --- a/src/fellchensammlung/urls.py +++ b/src/fellchensammlung/urls.py @@ -1,4 +1,7 @@ from django.urls import path, include +from django_registration.backends.activation.views import RegistrationView + +from .forms import CustomRegistrationForm from . import views @@ -35,6 +38,12 @@ urlpatterns = [ # ex: user/1 path("user//", views.member_detail, name="user-detail"), + path('accounts/register/', + RegistrationView.as_view( + form_class=CustomRegistrationForm + ), + name='django_registration_register', + ), path('accounts/', include('django_registration.backends.activation.urls')), path('accounts/', include('django.contrib.auth.urls')),