Change the way of using login_required decorator
@@ -18,6 +18,7 @@ from django.utils.translation import ugettext_lazy as _
from readthedocs.core.forms import UserDeleteForm, UserAdvertisingForm
+@login_required
def create_profile(
request, form_class, success_url=None,
template_name='profiles/private/create_profile.html',
@@ -109,9 +110,7 @@ def create_profile(
return render(request, template_name, context=context)
-create_profile = login_required(create_profile)
-
-
+@login_required
def edit_profile(
request, form_class, success_url=None,
template_name='profiles/private/edit_profile.html', extra_context=None):
@@ -192,9 +191,6 @@ def edit_profile(
return render(request, template_name, context=context)
-edit_profile = login_required(edit_profile)
-
-
@login_required()
def delete_account(request):
form = UserDeleteForm()
