|
@@ -5,6 +5,7 @@ from django.shortcuts import redirect
|
|
|
from django.contrib.auth import authenticate
|
|
|
from django.views.generic.base import TemplateView
|
|
|
from django.conf import settings
|
|
|
+from django.urls import reverse
|
|
|
|
|
|
|
|
|
from django.contrib.auth.models import User
|
|
@@ -29,8 +30,7 @@ def index(request):
|
|
|
if 'username' in request.POST and 'password' in request.POST:
|
|
|
user = User.objects.create_superuser(username=request.POST['username'], password=request.POST['password'])
|
|
|
user.save()
|
|
|
- return redirect('registration-login')
|
|
|
-
|
|
|
+ return redirect('%s?next=%s' % (reverse('registration-login'), '/config/instance-add'))
|
|
|
template = loader.get_template('registration/start.html')
|
|
|
context = {
|
|
|
'users_admin': users_admin.all()
|