Commit 05f9fdba authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier

Merge branch '31-registration-not-working-anymore-after-update' into 'master'

Resolve "Registration not working anymore after update"

Closes #31

See merge request !26
parents dddd0b2a afd035c9
Pipeline #6157 passed with stage
in 27 seconds
......@@ -5,8 +5,10 @@ from django.conf.urls import url, include
from django.contrib.auth.models import Group
from django.views.decorators.csrf import csrf_exempt
from django_registration.backends.activation.views import RegistrationView
from djangoldp.permissions import LDPPermissions
from djangoldp.views import LDPViewSet
from djangoldp_account.forms import LDPUserForm
from .models import ChatProfile, Account
from .views import userinfocustom, RPLoginView, RPLoginCallBackView, check_user
......@@ -16,7 +18,17 @@ Group._meta.authenticated_perms = getattr(settings, 'GROUP_AUTHENTICATED_PERMISS
Group._meta.owner_perms = getattr(settings, 'GROUP_OWNER_PERMISSIONS', ['inherit'])
urlpatterns = [
url(r'^groups/', LDPViewSet.urls(model=Group, fields=['@id', 'name', 'user_set'], permission_classes=[LDPPermissions])),
url(r'^groups/',
LDPViewSet.urls(model=Group, fields=['@id', 'name', 'user_set'],
permission_classes=getattr(settings, 'GROUP_PERMISSION_CLASSES', [LDPPermissions]),
)
),
url(r'^auth/register/$',
RegistrationView.as_view(
form_class=LDPUserForm
),
name='django_registration_register',
),
url(r'^auth/', include('django_registration.backends.activation.urls')),
url(r'^auth/', include('django.contrib.auth.urls')),
url(r'^accounts/', LDPViewSet.urls(model=Account, permission_classes=[LDPPermissions])),
......
from django.contrib.auth import get_user_model
from django_registration.forms import RegistrationForm
from djangoldp_account.models import LDPUser
class LDPUserForm(RegistrationForm):
class Meta(RegistrationForm.Meta):
model = get_user_model()
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