Django代码更改不会反映在生产服务器上 [英] Django code changes not reflecting on production server

查看:101
本文介绍了Django代码更改不会反映在生产服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我改变了.py文件,并在本地的dev上反映出来。服务器为Django后删除.pyc。
生产服务器甚至没有这个特定文件的.pyc。尝试触摸apache wsgi并重新启动apache在prod。服务器,但没有运气。
即使删除此.py文件也使应用程序工作相同。有memcached安装,但我没有太多的想法如何缓存,还有.git以及5个服务器托管 - 一个主要的4个负载平衡器。

I changed a .py file and changes reflected on local dev. server for Django after deleting .pyc. The production server does not even have .pyc for this specific file. Tried touching apache wsgi and restarting apache on prod. server but no luck. Even deleting this .py file makes application work the same. There is memcached installed but I don't have much idea how it caches, there is .git as well and 5 servers are hosting - one main, 4 load balancers.

问候!

推荐答案

100%确定你在看正在进行更改的服务器?我知道这听起来很愚蠢,但是为什么你不停止Apache,那么你还可以运行该页面吗?如果你可以肯定没有正确的服务器。

Are 100% sure you are looking at the right server you are making the changes to? I know that sounds stupid but, why don't you stop Apache, can you still run the page then? IF you can then you definitely don't have the correct server.

如果没有,请尝试重新加载Apache(与重新启动不同)。

If not, next try reloading Apache (thats different from restarting).

sudo service apache2 reload

如果这还不行,那么发布你的Apache设置,看看你推的那个错误的文件夹。

If this still does not work then post your Apache setup, if must be looking on the wrong folder to the one your pushing to.

这篇关于Django代码更改不会反映在生产服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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