Django管理员注销模型保存 [英] Django admin logging out on model save

查看:56
本文介绍了Django管理员注销模型保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的根public_html文件夹运行Django应用,并且工作正常.但是我的其他一个应用程序有问题.通过重定向到子目录来访问有问题的应用程序(例如, http://workingsite.com 重定向到public_html, http://brokensite.com 重定向到public_html/foo)

I'm running a Django app for my root public_html folder, and it's working fine. But there's a problem with one of my other apps. The problematic app is accessed through a redirect to a subdirectory (e.g. http://workingsite.com redirects to public_html, http://brokensite.com redirects to public_html/foo)

问题在于,每当需要在Django管理员中保存任何内容(添加或更改)时,会话就会过期.如果重试,有时会奏效.当我运行Django开发服务器时,这不会在我自己的计算机上发生.

The problem is that the session expires whenever anything needs to be saved in the Django admin (either added or changed). If you try again, sometimes it works. This does not happen on my own machine when I run the Django dev server.

两个应用程序settings.py文件中的时区都相同,这与两个.htaccess文件中的时区相同.

The timezone in both of the app settings.py files is the same, which is the same as the timezone in both of the .htaccess files.

这些应用程序几乎完全相同,除了工作的应用程序使用WYMEditor,而损坏的应用程序使用TinyMCE作为其文本编辑器.不知道为什么这样做会导致问题,但是为了以防万一,我将其包括在内.另外,我为坏了的应用程序中的管理员后端创建了一个自定义CSS文件(同样,应该不会造成问题).

The apps are almost identical, except the working app uses WYMEditor and the broken one uses TinyMCE as its text editor. Don't know why that would do anything to cause the problem, but I included it just in case. Also, I've made a custom CSS file for the admin backend in the broken app (again, shouldn't cause a problem).

推荐答案

似乎与我所在的公司存在配置问题-不再发生.

Seems to have been a configuration issue with the company I was hosting with - it's not happening anymore.

这篇关于Django管理员注销模型保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆