accounts.views.AccountCreateView.form_valid()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
from django.shortcuts import render
2
from django.views.generic.edit import FormView
3
from django.contrib.auth.forms import UserCreationForm
4
5
6
class AccountCreateView(FormView):
7
    template_name = 'accounts_create_form.html'
8
    form_class = UserCreationForm
9
    success_url = '/accounts/confirm/'
10
11
    def form_valid(self, form):
12
        form.save()
13
        return super(AccountCreateView, self).form_valid(form)
14