-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session问题解决和模版文件优化 #338
session问题解决和模版文件优化 #338
Conversation
按照最新的代码做镜像,部署运行后会报错,排查后发现问题原因为:
|
已经通过修改 Dockerfile、build.sh 文件,将bug修复 |
@@ -5,7 +5,7 @@ django-bootstrap-tags==1.2.0 | |||
Django==1.8.6 | |||
djangorestframework-jsonp==1.0.2 | |||
requests==2.10.0 | |||
uWSGI==0.8 | |||
#uWSGI==0.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要就删掉?
return HttpResponse('<h2>Permission Forbidden!</h2>') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一般会说"Permission denied"或直接"Forbidden","Permission Forbidden"不这么写
npm install | ||
npm run build | ||
|
||
rm -rf ${staticHome}/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm -rf 删除之前最好判断一下前面的变量是否为空. 因为该数据的执行权限是root. 如果前面的 {staticHome}为空。则会导致整个机器都完了。
30d93a7
to
bc9cefd
Compare
def login(request): | ||
if request.method == "POST": | ||
res = {} | ||
username = request.POST.get("username") | ||
password = request.POST.get("password") | ||
email = username + "@baifendian.com" | ||
ldap_user = ldap_get_vaild(username=username,passwd=password) | ||
# ldap_user = ldap_get_vaild(username=username,passwd=password) | ||
ldap_user = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不做ldap验证了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以了。 @abigbigbird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
完成的功能如下:
session如果失效则直接跳回登录页面.
新版的模版会对一下2个命令做优化:
npm run build #可以直接生成django可以识别的index.html文件不用做任何修改
npm start #执行改命令前不用每次修改webpack.config文件。
sh build.sh # 直接帮你编译好前端代码并拷贝到sirius web对应的目录。不用做任何操作就可以直接启动sirius了