typo + PEP8

This commit is contained in:
Qwann 2017-02-21 17:48:56 +01:00
parent d7049631d4
commit f33db473a5

View file

@ -3,13 +3,15 @@ from django.views.generic.edit import CreateView
from django.contrib.messages.views import SuccessMessageMixin from django.contrib.messages.views import SuccessMessageMixin
from django.core.urlresolvers import reverse_lazy from django.core.urlresolvers import reverse_lazy
class CreateUser(SuccessMessageMixin, CreateView): class CreateUser(SuccessMessageMixin, CreateView):
template_name = 'user/user_form.html' template_name = 'user/user_form.html'
form_class = CreateUserForm form_class = CreateUserForm
success_url = reverse_lazy('erkan:index') success_url = reverse_lazy('shared:home')
success_message = "Votre compte utilisateur a été correctement créé !" success_message = "Votre compte utilisateur a été correctement créé !"
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
ctx = super(CreateUser, self).get_context_data(**kwargs) ctx = super(CreateUser, self).get_context_data(**kwargs)
ctx['button'] = 'Créer' ctx['button'] = 'Créer'
ctx['page_title'] = "Création d'utilisateur" ctx['page_title'] = "Création d'utilisateur"
return ctx return ctx