help
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.
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 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 code and used 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. There was no MVC (Model View Controller)
paradigm way. All the 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.
Honesty, i love much more Python than 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 web framework and is
compatible with different database back-end. Such as MySQL,
PostgreSQL, SQLite, ... That's why I have choice that
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 contains the frequently asked
questions. Check it out! You may probably find there your answer too. Don't
hesitate to 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 website and look if 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/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 website and then run python tgsetup.py to install TuroboGears. 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 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 http://paco.sourceforge.net Like we install everything from
source on a LFS 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 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 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!
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=<environment> 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 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:
Or on Microsoft Windows operating systems:
Apache2 web server
See the info on TurboGears.
The info come from here.
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
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
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:
Lighttd web server
See the info on TurboGears.
...
Markup language
For the Pages, Articles, Links, Blog, Guestbook, you may use the python-markdown markup
language. An easy markup language to give some formating to your text files.
See the 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 us.
[Apache] : http://www.apache.org
Comments leaved by users (total: 0)
Add a comment
|
- Do you know that you may use some special markup syntax to create header, italic, bold, styling and links and much more. See the sandbox for the markup language.
- Do you need some other help?
|
[ Toggle on/off history ]
|