Commit d5971e80 authored by Alexander Færøy's avatar Alexander Færøy 🍍
Browse files

Show views for Gitlab user sign-up.

parent 24a19271
......@@ -4,4 +4,6 @@ from . import views
urlpatterns = [
path('', views.index, name='index'),
path('success/', views.success, name='success'),
path('failure/', views.failure, name='failure'),
]
from django.shortcuts import render
from django.http import HttpResponseRedirect
from .models import GitlabAccountRequestForm
def index(request):
return render(request, 'core/base.html')
if request.method == "POST":
form = GitlabAccountRequestForm(request.POST)
if form.is_valid():
form.save()
return HttpResponseRedirect('/success/')
return HttpResponseRedirect('/failure/')
return render(request, 'core/signup.html')
def success(request):
return render(request, 'core/success.html')
def failure(request):
return render(request, 'core/failure.html')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment