You can add new content types mapped on database tables, extend existing ones, add one or more object actions, easy building of add and edit views without having to touch any html file.
Kotti is shipped with the pytest framework and I love it! The tests setup is very easy and you can mock or initialize your reusable fixtures with a dependency injection technique.
If your customer wants to use Windows, no problem:
- How to install Kotti CMS on Windows (http://davidemoro.blogspot.com/2015/01/how-to-install-kotti-cms-on-windows.html)
How to prevent your content types to be added in content root
This blog post will explain how to prevent your content type to be added in the content root but only in Document types (they behave like folderish items too). What's the matter? The root itself is a Document.My solution was similar to the following one, but a bit different:
I tried to inherit all the default options and actions from the default Content's type info. This way you'll inherit all the backend menu actions.
# resources.py
from kotti.resources import TypeInfo
from kotti.resources import get_root
from kotti.resources import Content
...
class YourContentTypeInfo(TypeInfo):
def addable(self, context, request):
root = get_root()
if context == root:
return False
return super(YourContentTypeInfo, self).addable(context, request)
yourcontent_type_info_data = Content.type_info.copy(
name=u'YourContent',
title=_(u'YourContent'),
add_view=u'add_yourcontent',
addable_to=[u'Document'],
).__dict__.copy()
yourcontent_type_info = YourContentTypeInfo(**course_type_info_data)
class YourContent(Content):
""" A yourcontent type. """
implements(IDefaultWorkflow)
id = Column(Integer, ForeignKey('contents.id'), primary_key=True)
...
type_info = yourcontent_type_info
Done!
Feedback
After using Kotti for a while I can tell that the feedback is absolutely positive. It is the right choice when you don't need a much more complex system like Plone. So join the Python, Pyramid and Kotti community and say love to Kotti!All posts about Kotti
- Pyramid, MySQL and Windows: the good, the ugly and the bad
- Kotti CMS events - insert subobject automatically
- Kotti CMS - how to turn your Kotti CMS into an intranet
- Kotti CMS - how to store arbitrary data with annotations
- How to install Kotti CMS on Windows
- Kotti CMS - avoid types addable in content root
- Kotti CMS - how to create a new content type with an image
- Kotti CMS - workflow reference
No comments:
Post a Comment
Note: only a member of this blog may post a comment.