@csrf_protect
def account_register(request, next_url=u'dashboard'):
 siteconfig = SiteConfiguration.objects.get_current()
 auth_backends = get_enabled_auth_backends()
 if (auth_backends[0].supports_registration and siteconfig.get(u'auth_enable_registration')):
  response = register(request, next_page=reverse(next_url), form_class=RegistrationForm)
  return response
 return HttpResponseRedirect(reverse(u'login'))

@ csrf_protect def account_register ( request , next_url = u'dashboard' ) : siteconfig = SiteConfiguration . objects . get_current ( ) auth_backends = get_enabled_auth_backends ( ) if ( auth_backends [ 0 ] . supports_registration and siteconfig . get ( u'auth_enable_registration' ) ) : response = register ( request , next_page = reverse ( next_url ) , form_class = RegistrationForm ) return response return HttpResponseRedirect ( reverse ( u'login' ) )
display the appropriate registration page .