Where is the _controllers directory?

26 views
Skip to first unread message

Andrew Eggenberger

unread,
Apr 14, 2013, 9:47:25 PM4/14/13
to blogofil...@googlegroups.com
I recently installed version 8 and noticed the _controllers directory was missing when I run blogofile init <site> blog. I have some small modifications I want to make to the basic controllers but can't find them. According to the docs, the directory should be loaded by default during a blog initialization. Any assistance would be appreciated.

--
Andrew Eggenberger

Doug Latornell

unread,
Apr 17, 2013, 5:21:38 PM4/17/13
to blogofil...@googlegroups.com
There is no _controllers directory created when your create a new site because the only controllers used by default are those installed with the blog plugin. You should be able to find those in $PREFIX/site-packages/blogofile_blog/site_src/ but the value of $PREFIX will depend on whether you installed blogofile in a virtualenv or in your system Python install location (and on your OS too, I guess).

If you want to customize one of the default controllers you can create a _controllers/blog/ directory in your site, copy the controller you want to customize from the location above into that directory, and apply your changes. The modified version in your site should override the one from the plugin.

You can add your own custom controllers too, but you have to take the additional step of registering them in your _config.py file. The blogofile.com site source (https://github.com/EnigmaCurry/blogofile.com) shows an example of doing that.
Reply all
Reply to author
Forward
0 new messages