mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 08:36:23 +01:00
Reformatted code for easy reading.
This commit is contained in:
@@ -1,3 +1 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
|
||||
@@ -2,11 +2,11 @@ from django.contrib.auth.models import User
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
|
||||
from forms import RegistrationForm
|
||||
|
||||
|
||||
def register_user_view(request):
|
||||
|
||||
if request.method == 'POST':
|
||||
form = RegistrationForm(request.POST)
|
||||
|
||||
@@ -14,7 +14,7 @@ def register_user_view(request):
|
||||
|
||||
if not User.objects.filter(username=form.cleaned_data['username']).exists():
|
||||
user = User.objects.create_user(form.cleaned_data['username'],
|
||||
form.cleaned_data['email'], form.cleaned_data['password'])
|
||||
form.cleaned_data['email'], form.cleaned_data['password'])
|
||||
|
||||
user.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user