mirror of
https://github.com/ajurna/cbwebreader.git
synced 2025-12-06 06:17:17 +00:00
updated to make compatible with django 1.10
This commit is contained in:
@@ -4,7 +4,7 @@ This is for if you have a collection of comics on a media server and want to rea
|
|||||||
|
|
||||||
# Requirments
|
# Requirments
|
||||||
|
|
||||||
- [Django 1.9](https://www.djangoproject.com/)
|
- [Django 1.10](https://www.djangoproject.com/)
|
||||||
- [python 3.5](https://www.python.org/)
|
- [python 3.5](https://www.python.org/)
|
||||||
- [rarfile python library by Marko Kreen](https://github.com/markokr/rarfile) (included)
|
- [rarfile python library by Marko Kreen](https://github.com/markokr/rarfile) (included)
|
||||||
- [Unrar by winrar](http://rarlabs.com)
|
- [Unrar by winrar](http://rarlabs.com)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from django.shortcuts import render, redirect, RequestContext
|
|
||||||
from django.contrib.auth import authenticate, login, logout
|
from django.contrib.auth import authenticate, login, logout
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.shortcuts import render, redirect
|
||||||
|
|
||||||
from comic_auth.forms import LoginForm
|
from comic_auth.forms import LoginForm
|
||||||
|
|
||||||
@@ -19,17 +19,25 @@ def comic_login(request):
|
|||||||
else:
|
else:
|
||||||
return redirect('/comic/')
|
return redirect('/comic/')
|
||||||
else:
|
else:
|
||||||
context = RequestContext(request, {
|
return render(request,
|
||||||
'error': True,
|
'comic_auth/login.html',
|
||||||
|
{
|
||||||
})
|
'error': True,
|
||||||
return render(request, 'comic_auth/login.html', context)
|
})
|
||||||
|
else:
|
||||||
|
return render(request,
|
||||||
|
'comic_auth/login.html',
|
||||||
|
{
|
||||||
|
'error': True,
|
||||||
|
'form': form
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
context = RequestContext(request, {
|
return render(request,
|
||||||
'error': True,
|
'comic_auth/login.html',
|
||||||
'form': form
|
{
|
||||||
})
|
'error': True,
|
||||||
return render(request, 'comic_auth/login.html', context)
|
'form': form
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
if not User.objects.all().exists():
|
if not User.objects.all().exists():
|
||||||
return redirect('/setup/')
|
return redirect('/setup/')
|
||||||
|
|||||||
Reference in New Issue
Block a user