Passed
Pull Request — master (#26)
by Joe
01:29
created

accounts.views.AccountCreateView.form_valid()   A

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
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
Unused Code introduced by
Unused render imported from django.shortcuts
Loading history...
2
from django.views.generic.edit import FormView
3
from django.contrib.auth.forms import UserCreationForm
4
5
6
class AccountCreateView(FormView):
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
best-practice introduced by
Too many ancestors (8/7)
Loading history...
Unused Code introduced by
The variable __class__ seems to be unused.
Loading history...
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