def register(request): if request.method == 'POST': form = MyUserCreationForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect(reverse('users:login')) else: form = MyUserCreationForm() return render(request, 'users/register.html', {'form': form})
def ro_register(request): # current_site = Site.objects.get_current() if request.method == 'POST': form = MyUserCreationForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect(reverse('users:login')) else: form = MyUserCreationForm() return render(request, 'users/register.html', { # 'host': current_site.domain, 'form': form })