diff --git a/README.md b/README.md index 4d9c057..44f03c6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is for if you have a collection of comics on a media server and want to rea # Requirments -- [Django 1.9](https://www.djangoproject.com/) +- [Django 1.10](https://www.djangoproject.com/) - [python 3.5](https://www.python.org/) - [rarfile python library by Marko Kreen](https://github.com/markokr/rarfile) (included) - [Unrar by winrar](http://rarlabs.com) diff --git a/comic_auth/views.py b/comic_auth/views.py index 0affcf6..bc8b435 100644 --- a/comic_auth/views.py +++ b/comic_auth/views.py @@ -1,6 +1,6 @@ -from django.shortcuts import render, redirect, RequestContext from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User +from django.shortcuts import render, redirect from comic_auth.forms import LoginForm @@ -19,17 +19,25 @@ def comic_login(request): else: return redirect('/comic/') else: - context = RequestContext(request, { - 'error': True, - - }) - return render(request, 'comic_auth/login.html', context) + return render(request, + 'comic_auth/login.html', + { + 'error': True, + }) + else: + return render(request, + 'comic_auth/login.html', + { + 'error': True, + 'form': form + }) else: - context = RequestContext(request, { - 'error': True, - 'form': form - }) - return render(request, 'comic_auth/login.html', context) + return render(request, + 'comic_auth/login.html', + { + 'error': True, + 'form': form + }) else: if not User.objects.all().exists(): return redirect('/setup/')