这是一个很奇怪的问题,但是在过去的3个小时里它一直让我疯狂。 我想玩一个基于金字塔的cms Kotti,并且我通过使用easy_install( sudo easy_install kotti )安装它而犯了一个错误。 我收到了奇怪的行为,我不确定它是程序本身还是我安装它的方式。
我想更改代码的某些部分,看看它是如何工作的,但是我的更改没有生效。 我通过easy_install安装后,我做了:
virtualenv mysite --no-site-packages bin/easy_install pyramid git clone https://github.com/Pylons/Kotti.git cd Kotti sudo ../bin/python setup.py develop ../bin/pserve app.ini --reload我去了127.0.0.0:5000,看到它正在工作。 第一页有文字说:“恭喜!您已成功安装Kotti。” 所以我进入kotti目录并做了grep "Congratulations" *.* ,发现它来自populate.py 。 所以我打开文件并将其改为另一段文字并保存。 因为我在pserve上有--reload标志,我注意到它在终端上重新加载了我的代码,当我回到本地时,数据没有改变。
我很困惑,因为当我更改python代码时服务器会重新加载,所以它会看到更改,但它不会反映在浏览器中(只是为了测试浏览器缓存是否使用不同的浏览器并清除了缓存)。
有任何想法吗?
This is a weird question but its been driving me bonkers for the last 3 hours. I wanted to play around with a pyramid based cms Kotti and I made a mistake by installing it using easy_install first(sudo easy_install kotti). I'm getting weird behavior and I'm not sure if its the way the program itself or the way I installed it.
I want to change some parts of the code and see how it works but my changes are not taking effect. After I installed it via easy_install I did:
virtualenv mysite --no-site-packages bin/easy_install pyramid git clone https://github.com/Pylons/Kotti.git cd Kotti sudo ../bin/python setup.py develop ../bin/pserve app.ini --reloadI went to 127.0.0.0:5000 and saw it was working. The first page has text that says "Congratulations! You have successfully installed Kotti." so I went into the kotti directory and did a grep "Congratulations" *.* and found it was coming from populate.py. So I opened the file and changed the line to a different piece of text and saved. Because I have the --reload flag on pserve I noticed it reloaded my code on the terminal and when I went back to the site the data did not change.
I'm so confused because the server reloads when I change the python code, so it sees the change but its not reflected in the browser(just to test if its the browser cache I tried it using different browsers and cleared the cache).
Any ideas?
最满意答案
运行python -v将显示所有导入
Running python -v will show all the imports
更多推荐
发布评论