first_boot: Add separate greeting page

This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2015-10-28 20:02:56 -04:00
1 parent 23eb40fce8
commit f3a0c70d23
6 files changed
+122 -59

No files matched your search

+4 -4
View File
@@ -28,15 +28,15 @@ from plinth.errors import ActionError
from plinth.modules.users.forms import GROUP_CHOICES
class State0Form(auth.forms.UserCreationForm):
"""Firstboot state 0: create a new user."""
class State1Form(auth.forms.UserCreationForm):
"""Firstboot state 1: create a new user."""
def __init__(self, *args, **kwargs):
self.request = kwargs.pop('request')
super(State0Form, self).__init__(*args, **kwargs)
super(State1Form, self).__init__(*args, **kwargs)
def save(self, commit=True):
"""Create and log the user in."""
user = super(State0Form, self).save(commit=commit)
user = super(State1Form, self).save(commit=commit)
if commit:
try:
actions.superuser_run(