A generic control panel for themers and site integrators
Project description
Introduction
============
``iservices.controlpanel`` is a plone control panel that provides common
settings for themers and integrators. The idea behind this control panel is that
plone administrators (and not the integrator or programmer) will have the
ability to:
* Define social accounts for use all over the site, specially on themes. The
programmer/integrator will have to integrate it's product or theme with this
control panel (hopefully an easy_step) and get this settings to be applied on
their logic.
* Allows to change the global background and foreground colors that plone uses
to draw it's interface on plonetheme.sunburs (Actually, only two colors). If the
user requires more than that, it might be better to craft a complete theme
product.
* Change the plone logo. The site administrator can change the logo. This
provides an easy plone theming deployment without the cost of creating a theme
from scratch just to change the logo.
* Change the footer and colophon text. The site administrator can change the
text of the footer and colophon without needing the programmer to make changes
to any theme.
Usage
=====
Install using buildout
-----------------------
Add ``iservices.controlpanel`` to your ``eggs`` subsection::
eggs =
...
iservices.controlpanel
This package depends on a set of other packages, hopefully, all packages should
be pulled from pypi automatically. However, you'll have to adjust the
``extends`` subsection according to the following pattern::
extends =
http://dist.plone.org/release/<plone-version>/versions.cfg
...
http://good-py.appspot.com/release/plone.app.z3cform/0.5.0-1?plone=<plone-version>
http://good-py.appspot.com/release/plone.app.registry/1.0b2?plone=<plone-version>
Replace ``<plone-version>`` with the Plone version you are working on, i.e., ``4.0.3``
How to use it on your packages and themes
-----------------------------------------
Of course, If you use this package, you'd want access to the settings it
manages, right? This package has a small API that encapsulates the the
boilerplate code and makes it easy to you to use it.
In order to
access the settings of the control panel, you just use a very simple module
import::
>>> from iservices.controlpanel.api import settings
All settings are available using standar Python dot notation. Example::
>>> settings.foreground_color
u'#205C90'
If you access an unknown name, you will get an AttributeError:
>>> registry.some_unknown_key
Traceback (most recent call last):
...
NameError: name 'registry' is not defined
Also, using getattr(), even on an existing key name, does not make it:
>>> getattr(settings,foreground_color)
Traceback (most recent call last):
...
NameError: name 'foreground_color' is not defined
Sometimes, settings on the control panel will have empty values. It is suggested
that, when this happens, the funcionality related to this particular setting
should be disabled or modified in some way.
>>> def do_something_with(some_setting):
... if some_setting:
... print "Doing stuff when this registry entry is set."
... else:
... print "Disable functionality when this registry is not set."
...
>>> # the twitterlink setting is empty by default
>>> print settings.twitterlink
None
>>> do_something_with(settings.twitterlink)
Disable functionality when this registry is not set.
>>> settings.twitterlink = 'http://twitter.com/tzicatl'
>>> do_something_with(settings.twitterlink)
Doing stuff when this registry entry is set.
And that's all there is for the API.
Credits
=======
Author
Noe Nieto <noe@iservices.com.mx>
Websites
http://iservices.com.mx/
http://noenieto.com/
Contact-email
desarrollo@iservices.com.mx
Changelog
=========
0.2 - March 15th, 2011
+ First public release with a small set of settings, proper testing and small
API with documentation.
+ Depends on plone.app.registry, but hopefully, installing this egg alone, will
pull all the required packages.
+ Tested in Plone 4
0.1 (unreleased yet)
-------------------
+ Initial release, make all the setuptools boilerplate, and create the git repo.
============
``iservices.controlpanel`` is a plone control panel that provides common
settings for themers and integrators. The idea behind this control panel is that
plone administrators (and not the integrator or programmer) will have the
ability to:
* Define social accounts for use all over the site, specially on themes. The
programmer/integrator will have to integrate it's product or theme with this
control panel (hopefully an easy_step) and get this settings to be applied on
their logic.
* Allows to change the global background and foreground colors that plone uses
to draw it's interface on plonetheme.sunburs (Actually, only two colors). If the
user requires more than that, it might be better to craft a complete theme
product.
* Change the plone logo. The site administrator can change the logo. This
provides an easy plone theming deployment without the cost of creating a theme
from scratch just to change the logo.
* Change the footer and colophon text. The site administrator can change the
text of the footer and colophon without needing the programmer to make changes
to any theme.
Usage
=====
Install using buildout
-----------------------
Add ``iservices.controlpanel`` to your ``eggs`` subsection::
eggs =
...
iservices.controlpanel
This package depends on a set of other packages, hopefully, all packages should
be pulled from pypi automatically. However, you'll have to adjust the
``extends`` subsection according to the following pattern::
extends =
http://dist.plone.org/release/<plone-version>/versions.cfg
...
http://good-py.appspot.com/release/plone.app.z3cform/0.5.0-1?plone=<plone-version>
http://good-py.appspot.com/release/plone.app.registry/1.0b2?plone=<plone-version>
Replace ``<plone-version>`` with the Plone version you are working on, i.e., ``4.0.3``
How to use it on your packages and themes
-----------------------------------------
Of course, If you use this package, you'd want access to the settings it
manages, right? This package has a small API that encapsulates the the
boilerplate code and makes it easy to you to use it.
In order to
access the settings of the control panel, you just use a very simple module
import::
>>> from iservices.controlpanel.api import settings
All settings are available using standar Python dot notation. Example::
>>> settings.foreground_color
u'#205C90'
If you access an unknown name, you will get an AttributeError:
>>> registry.some_unknown_key
Traceback (most recent call last):
...
NameError: name 'registry' is not defined
Also, using getattr(), even on an existing key name, does not make it:
>>> getattr(settings,foreground_color)
Traceback (most recent call last):
...
NameError: name 'foreground_color' is not defined
Sometimes, settings on the control panel will have empty values. It is suggested
that, when this happens, the funcionality related to this particular setting
should be disabled or modified in some way.
>>> def do_something_with(some_setting):
... if some_setting:
... print "Doing stuff when this registry entry is set."
... else:
... print "Disable functionality when this registry is not set."
...
>>> # the twitterlink setting is empty by default
>>> print settings.twitterlink
None
>>> do_something_with(settings.twitterlink)
Disable functionality when this registry is not set.
>>> settings.twitterlink = 'http://twitter.com/tzicatl'
>>> do_something_with(settings.twitterlink)
Doing stuff when this registry entry is set.
And that's all there is for the API.
Credits
=======
Author
Noe Nieto <noe@iservices.com.mx>
Websites
http://iservices.com.mx/
http://noenieto.com/
Contact-email
desarrollo@iservices.com.mx
Changelog
=========
0.2 - March 15th, 2011
+ First public release with a small set of settings, proper testing and small
API with documentation.
+ Depends on plone.app.registry, but hopefully, installing this egg alone, will
pull all the required packages.
+ Tested in Plone 4
0.1 (unreleased yet)
-------------------
+ Initial release, make all the setuptools boilerplate, and create the git repo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iservices.controlpanel-0.2.zip
(27.7 kB
view details)
File details
Details for the file iservices.controlpanel-0.2.zip
.
File metadata
- Download URL: iservices.controlpanel-0.2.zip
- Upload date:
- Size: 27.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b02d3b99f12bd7ac05e76ed163da4858ae9104053a1dbf4e39c2ae2a3fd2a7aa |
|
MD5 | f09ccf4cc18058d621ed4928b5eb3650 |
|
BLAKE2b-256 | ca4adc90b16f485814a70ddc94c5586c3f9b9fa86f49b305686b9391d1b4d477 |