3

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 --reload

I 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?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Lostsoul
  • 25,013
  • 48
  • 144
  • 239
  • 2
    The `populate` module generates a new root document only if one doesn't exist yet; changing the code won't change the already generated document. – Martijn Pieters Jun 24 '12 at 08:35

2 Answers2

4

When you run a Kotti web application for the first time, as with most CMS systems, it runs a set of data population methods (including that populate.py code you mentioned) to set up a database and insert all the content you see. The --reload is only telling the deployment server to watch for file changes as you work on the file system.

If you want to rerun the installation/population code then you need to delete the created database. If you haven't made any changes from their example app.ini file it will likely be Kotti.db.

Alternatively use the CMS to make the changes, as is intended by the CMS systems.

Jimmy Hillis
  • 321
  • 2
  • 4
3

Running python -v will show all the imports

John La Rooy
  • 295,403
  • 53
  • 369
  • 502