fix import some bug

pull/26/head
广宏伟 9 years ago
parent 0e24ebdb26
commit 73f94fecb5

@ -10,7 +10,7 @@ import random
import subprocess
import paramiko
import struct, fcntl, signal, socket, select, fnmatch
from settings import JLOG_FILE, KEY, URL, log_dir, log_level
from settings import *
from django.core.paginator import Paginator, EmptyPage, InvalidPage
from django.http import HttpResponse, Http404

@ -198,6 +198,7 @@ def is_latest():
def Login(request):
"""登录界面"""
error = ''
if request.user.is_authenticated():
return HttpResponseRedirect('/')
if request.method == 'GET':
@ -229,8 +230,8 @@ def Login(request):
# response.set_cookie('username', username, expires=604800)
# response.set_cookie('seed', PyCrypt.md5_crypt(password), expires=604800)
# return response
# else:
# error = '密码错误,请重新输入。'
else:
error = '密码错误,请重新输入。'
else:
error = '用户名或密码错误'
return render_to_response('login.html', {'error': error})

Loading…
Cancel
Save