6 help 2007-09-16 18:49:00 2008-09-07 22:25:00 pyguicms helpsystem pyguicms help system This is the main help page of the pyguicms project. Many references that may point to other pages are listed here. Do not hesitate to leave a comment on this page or the PYGUICMS FAQ. ///Table of Contents Goes Here/// # Introduction This page give some help about the `PYGUICMS` project. There's actually not yet that much of informations right now. Take also a look to the [PYGUICS FAQ](/pages/view/pyguicms_faq) if you not find back your answer. Do not hesitated to contact us. The `PYGUICMS` is a Pythonized version of the `GUICMS` project. Yet Another Content Management System. A tool to provide some "data" on the web. The `GUICMS` project was written in [PHP][PHP] code and used [MySQL][MySQL] as database back-end. The project started after a need to have a tool to publish some data. Mostly some `articles`, notes about some stuff. I wanted a little `links` section to store all my lovely `links`. Later I decided to add some articles (my own notes) of some different stuff. Then there was a need for a little `blog` and a `guestbook`... And so has the `GUICMS` born and became what it is. Yeah, some very basic stuff. The big problem with the `GUICMS` project is that it is only able to use the [MySQL][MySQL]. There was no [MVC] (http://en.wikipedia.org/wiki/Model-view-controller) (Model View Controller) paradigm way. All the [PHP][PHP] code is hard coded in between the `HTML` stuff. I had not make use of a templating system. Once the `GUICMS` became bigger, it became more and more difficult to manage all that stuff. That's why I had a need to change many things. A need to use a `MVC` way and not limited to the [MySQL][MySQL]. Honesty, i love much more [Python][Python] than [PHP][PHP]. I already use Python for some administration task where a shell script may be not optimal for such tasks. `PHP` may be used for admin task but that's lesser common. `PYGUICMS` make use of the [TurboGears] [TurboGears] web framework and is compatible with different database back-end. Such as [MySQL][MySQL], [PostgreSQL] [PostgreSQL], [SQLite] [SQLite], ... That's why I have choice that [Python] [Python] web framework. "Using tools i like." *NOTE: The `PYGUICMS` is not yet usable like expected at this stage, like there's still many things left to do. At this stage, it will be only interesting for developers and for testers, debuggers. There's not yet a first stable release.* # The PYGUICMS FAQ The [PYGUICS FAQ](/pages/view/pyguicms_faq) contains the frequently asked questions. Check it out! You may probably find there your answer too. Don't hesitate to [contact] (../../contact/) us or leave a comment if there's not yet some information for a particular topic of to less informations. # Setup The `PYGUICMS` project should work everywhere `Python` is installable. This may say that the `PYGUICMS` should be compatible with almost every most know operating system. Checkout the [Python][Python] website and look if [Python] [Python] may be installed on your Operating System. If you have tested the `pyguicms` on another distribution or operating system listed below, please contact the author of the `pyguicms` to let it know. It will be interesting to fill more informations about other distributions/operating systems. ## Requirements * python2.4 (http://www.python.org) * python2.4-pysqlite2 (if you want to use it with sqlite) * And whatever python-database related stuff you want to use ## Installation Some parts of the setup may be generic and other may be related to the operating system you may use. So lets first start with the installation part. We may ensure that all the requirements are been installed. **Get the informations of the README.txt file** ### (Debian) GNU/Linux This may apply to some other [GNU][GNU]/[Linux][Linux] distributions. You may take a look in you package management tool for the package `python-markdown`. On Debian you may use the follow command to install the needed package: aptitude install python-turbogears There may a need to install a few more packages... You can also make use of the `easy_install` (included in `python-setuptools`) to install the most recent stable version. If you proceed so, i suggest you to make use of `paco` to track the installed files. See the LFS section bellow. Note for the old-stable (Sarge) users: I have not yet get `TurboGears` working on a `Debian Sarge` box. There is a little problem with the `sqlite` version available on `Debian Sarge`. I guess with other database backends there will be no problem. But i have not yet tested like i make use of `sqlite` at this stage in the development of this stuff. But i guess that these users have forget to upgrade his box. So, i don't care :-p ### Install from "source" You can easy use the `tgsetup.py` file to download the needed stuff and install this in a very easy way. ### MS Windows Windows operating system. We should need to have `python2.4` and `python-setuptools` installed and fetch the `tgsetup.py` from the [TurboGears] [TurboGears] website and then run `python tgsetup.py` to install [TuroboGears] [TurboGears]. Then you be able to run `pyguicms`. But that's my big guess about it! The `pyguicms` need to be are tested on a MS box. I suggest to install the [ActivePython] (http://www.activestate.com/Products/activepython/) from `ActiveState`. This is a bundled Python2.x (2.4 or 2.5) version with some extra win32 modules. This is a very interesting start bundle for `Microsoft Windows`. ### For LFS (Linux from scratch) Note: I used the `paco` source package manager to track down all the stuff i install. See Like we install everything from source on a [LFS] (http://www.linuxfromscratch.org) box it's much more easier to manager the installed stuff with the `paco` package manager, we can easy see where the installed file are and to remove the packages (installed files) later. `paco` have also some nice features, like the `pacoball` that permit to make a tar ball of the installed package, so that you later more can reinstall the package or to install it on other boxes. You not need to make use of `paco`. It will just help you a bit. I recommend it if you not yet make use of a system to track down the packages you install from source. Download the `tgsetup.py` from the [TurboGears] [TurboGears] website. It will download all the required dependencies. Further `python-setuptools` will be installed by the same way. What will be useful to install some other python stuff later. The easiest way to install all the needed stuff is: I used `paco` as source package manager. paco -lp turbogears-and-depencies-1.0.1 "python tgsetup.py" Then i can watch the installed files with: paco -f turbogears-and-depencies-1.0.1 There is also a little GUI, see `gpaco`. Refer to the `paco` documentation for more info. The following packages will be automatically installed: setuptools-0.6c5 TurboGears-1.0.1 SQLObject-0.7.3 configobj-4.4.0 RuleDispatch-0.5a0-dev_r2115 FormEncode-0.7 elementtree-1.2.6-20050316 cElementTree-1.0.5_20051216 PasteScript-1.3 simplejson-1.6 CherryPy-2.2.1 TurboKid-0.9.9 TurboCheetah-0.9.5 TurboJson-1.0 PyProtocols-1.0a0 PasteDeploy-1.1 Paste-1.3 kid-0.9.5 Cheetah-2.0rc7 Note: This way of installing `TurboGears` and all his required dependencies is not the recommended way if you want to track each different required package and to be able to have a full control of all the installed requirements. I mean; if you install later some other stuff that depend on the `TurboGears` and then you remove the `TurboGears`. There will be stuff missing. What i recommend is to first install `setuptools` with the `paco` source package manager and then install one be one all the required stuff. See the list above. So that you have a better control of each installed `Python` package. ## Configuration Remove or better, rename the `setup.py` to `setup.py_ORG` if you want to make use of the production mode. Execute the `start_pyguicms.py` without an argument that define the type of environment and this will make use of the `dev.cfg` configuration file if there's no `prod.cfg` configuration file found. With the type of environment i mean the `development` or the `production` server. The development spawn some information to the console and is much more slower as the production environment. The `development` is intended for what this mean. Only people who is working on the code may need this environment. So that the code will be reloaded when some changes on the code has been made. As default, the `dev.cfg` configuration file will be used. Edit the `dev.cfg` or `prod.cfg` file depending of your choice and read the comments in there. This configuration file is self explaining and should be not a problem to define the different options. ## Setup the database Once that everything is been setup, you may need to add the default data. The default data is the permissions, groups, users, pages, ... This is a required step! If you make use of [MySQL] [MySQL] you may need to create the database by the hand and create a special user reserved for this database. Give that user only rights for the `pyguicms` database and don't user your `root` or `administrator` account of [MySQL] [MySQL]! To put the default data into the database run the following script in the directory containing the `pyguicms` files: python setup_db.py --verbose --mode=dev --start The `--mode=` define the environment to setup. This is in most of the case a different database. ## Deployment The `pyguicms` should be run with various webserver. Actually, only informations for `apache2` is provided. Don't hesitate to [contact] (../../contact/) us if you have setup the `pyguicms` project on another webserver. ### Using the build-in web server This little webserver is able to handle around 1000 requests seconds. In the most cases, this build-in webserver is more as enough for some littler projects. Where there are not that much visitors at the same time. Start the script as following: ./start_pyguicms.py Or on `Microsoft Windows` operating systems: python start_pyguicms.py ### Apache2 web server See the info on [TurboGears](http://docs.turbogears.org/1.0/BehindApache). The info come from [here] (http://www.lucasmanual.com/mywiki/TurboGears#head-9a9a185587f4fe604d0bc97ac2117be0770d92aa). Thank you very much for this info! It was pain in the ass to get my project running with [Apache] [Apache] without your tricks! Install the required stuff: aptitude install apache2 aptitude install libapache2-mod-proxy-html Load the needed apache modules: a2enmod proxy a2enmod proxy_http Create a new file at: /etc/apache2/conf.d/pyguicms and put the following: ProxyPreserveHost on Order allow,deny Allow from all ProxyPass /pyguicms/ http://127.0.0.1:8080/pyguicms/ ProxyPassReverse /pyguicms/ http://127.0.0.1:8080/pyguicms/ ProxyPass /static/ http://127.0.0.1:8080/static/ ProxyPassReverse /static/ http://127.0.0.1:8080/static/ Now, force the reload of the apache config: /etc/init.d/apache2 force-reload Start the pyguicms project: ./start_pyguicms.py ### Lighttd web server See the info on [TurboGears](http://docs.turbogears.org/1.0/LightTPD). ... # Markup language For the [Pages] (/pages/), [Articles] (/articles/), [Links] (/links/), [Blog] (/blogs/), [Guestbook] (/guestbook/), you may use the `python-markdown` markup language. An easy markup language to give some formating to your text files. See the [sandbox] (/pages/view/sandbox). ## States of Articles, Links, Blogs, News, Pages The state of an item determine the availability of it. This means that we could create some items that will be only viewable be members, ... * Draft - Only members will see this item * Private - Only admin people will see this item. * Public Draft - The whole public will see this, with a warning of his state * Published - The item is readable for everyon. * Reviewing - The item is only viewable be members and needs to be approved. # Support You can support us in various ways. * Writing documentation for the project. * Develop on the code etc. * Donate us. ## Todo A link should be pointed to the `TODO` file. To avoid that we may maintain to much different versions of the `TODO` file. And we should only point to the latest version of the `TODO` file. ## Donation You may sponsor us project so that we may develop it as a full time job. Please [contact] (../../contact/) us. [PHP]: http://www.php.org [Python]: http://www.python.org [MySQL]: http://www.mysql.org [TurboGears]: http://www.turbogears.org [HTML]: http://en.wikipedia.org/wiki/HTML [PostgreSQL]: http://postgresql.org [SQLite]: http://www.sqlite.org [Apache] : http://www.apache.org [GNU]: http://www.gnu.org [Linux]: http://www.linux.org