custom content types in FeinCMS

210 views
Skip to first unread message

Gour

unread,
Sep 27, 2012, 4:27:08 AM9/27/12
to django-...@googlegroups.com
Hello,

I was trying FeinCMS three years ago, but then, due to lack of time
abandoned idea of migrating to Django and had to stay with PHP CMS-es.

Now I'm definitely determined to leave PHP and embrace Python/Django
(played shortly with web2py, but there are no mature CMS/blog apps to
start with).

In Django I see there are 3 big:

a) Django-CMS

b) FeinCMS and

c) Mezzanine

Some (FeinCMS & Mezzanine) offer CMS/blog/ecommerce in one or few
closely related packages, while other (Django-CMS) can re-use 3rd party
apps (here I'm thinking about Zinnia blog engine & djanho-shop).

There are pro/cons for every approach, but we do not mind if
combination allows us to achieve our goals.

I'm coming from Concrete5 (PHP CMS) where the page is divided
into specific 'areas' and one can add as many as desired content type
blocks to each page 'area' where content type blocks are like 'black
boxes' encapsulating specific functionality (e.g. general content, form
block, Google map, Image, RSS block, video player, download list etc.
are some of the blocks available for re-use) and the end-user can use
them like LEGO bricks to create customized content.

Let's take simple page with the following template:

header |
--------------------------------- |
| sidebar
|
main area |
----------------------------------|

and I'd like to put together the following page:


image |
----------------------------------|
| RSS
content (TinyMCE) | ------
----------------------------------|
| Google map
youtube video |
----------------------------------|

iow. have image in the header, RSS & Google map displayed in the right
sidebar and two blocks in the main are: content entered via tinyMCE
editor as well as video player for youtube videos?

I believe it's very close to the way Django-CMS do the things with
their 'plugin placeholders'.

Otoh, it seems to me that Mezzanine cannot achieve the same thing (I did
ask on their list about it and waiting for reply) easily due to "the
idea of a content type is the same as a page".

Is it possible to achieve such structure easily in the FeinCMS or how
to do it?

What if I'd like to swap order in .e.g main area having first 'block'
with youtube video and then tinyMCE-generated content below?

Does it require new custom structure to be defined?


I really want to settle on *one* Django-based CMS framework which can
solve all our web needs, so, please help me.


Sincerely,
Gour

--
As the embodied soul continuously passes, in this body,
from boyhood to youth to old age, the soul similarly passes
into another body at death. A sober person is not bewildered
by such a change.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
signature.asc

Matthias Kestenholz

unread,
Sep 27, 2012, 4:44:29 AM9/27/12
to django-...@googlegroups.com
On Thu, Sep 27, 2012 at 10:27 AM, Gour <go...@atmarama.net> wrote:
> [...]
>
> a) Django-CMS
>
> b) FeinCMS and
>
> c) Mezzanine
>
> Some (FeinCMS & Mezzanine) offer CMS/blog/ecommerce in one or few
> closely related packages, while other (Django-CMS) can re-use 3rd party
> apps (here I'm thinking about Zinnia blog engine & djanho-shop).
>
> There are pro/cons for every approach, but we do not mind if
> combination allows us to achieve our goals.

Just as an example, FeinCMS' ApplicationContent allows the use of an
unmodified django-registration. What you say isn't wrong however, most
of the time some adaptation is required if you want to include apps via
ApplicationContent. That's not the only way to integrate 3rd party apps
though -- you always have the possibility to add
feincms.context_processors.add_page_if_missing to TEMPLATE_CONTEXT_PROCESSORS
to ensure the presence of a feincms_page variable in the template rendering
context so that you can use this page to render the navigation, the sidebar etc.


> I'm coming from Concrete5 (PHP CMS) where the page is divided
> into specific 'areas' and one can add as many as desired content type
> blocks to each page 'area' where content type blocks are like 'black
> boxes' encapsulating specific functionality (e.g. general content, form
> block, Google map, Image, RSS block, video player, download list etc.
> are some of the blocks available for re-use) and the end-user can use
> them like LEGO bricks to create customized content.

Yeah, that's exactly the way it's done in FeinCMS:

- We use the name `regions`, not `areas`, but that's exactly the same
- 'content type blocks': We use the same name for that

> Let's take simple page with the following template:
>
> header |
> --------------------------------- |
> | sidebar
> |
> main area |
> ----------------------------------|
>
> and I'd like to put together the following page:
>
>
> image |
> ----------------------------------|
> | RSS
> content (TinyMCE) | ------
> ----------------------------------|
> | Google map
> youtube video |
> ----------------------------------|
>
> iow. have image in the header, RSS & Google map displayed in the right
> sidebar and two blocks in the main are: content entered via tinyMCE
> editor as well as video player for youtube videos?
>
> I believe it's very close to the way Django-CMS do the things with
> their 'plugin placeholders'.

Yes.

> Otoh, it seems to me that Mezzanine cannot achieve the same thing (I did
> ask on their list about it and waiting for reply) easily due to "the
> idea of a content type is the same as a page".
>
> Is it possible to achieve such structure easily in the FeinCMS or how
> to do it?

Page.register_templates({
'title': _('Standard template'),
'path': 'feincms_base.html',
'regions': [
('main', _('Main region')),
('sidebar', _('Sidebar'), 'inherited'),
('header', _('Header'), 'inherited'),
],
})

This configuration assumes that you do not want to explicitly add
sidebar and header content to each and every page -- it's enough to
define some content on the root page, and all subpages which do not
override the sidebar and/or header region with their own content
automatically inherit the content type blocks of their ancestors.

> What if I'd like to swap order in .e.g main area having first 'block'
> with youtube video and then tinyMCE-generated content below?
>
> Does it require new custom structure to be defined?

No. All you have to do is drag the video (or the tinymce instance) to
the new place. All content type blocks have dragging handles with
which you can easily reorder inside one region.

> I really want to settle on *one* Django-based CMS framework which can
> solve all our web needs, so, please help me.

I think you wont be disappointed with FeinCMS. It does have a steeper
learning curve than the other Django-based CMSes, but it also offers
more flexibility. That may or may not be a good thing for your
particular use case -- that's your call to make.


Best regards,
Matthias

Martin J. Laubach

unread,
Sep 27, 2012, 4:45:29 AM9/27/12
to django-...@googlegroups.com
In FeinCMS, you generally write a "template page", where you place your different regions (header, main, sidebar). That template is just a normal Django template, you can use all of Django's built-ins as well as anything else that works with Django.

Which regions you have is freely definable, and where you place those regions on a page is also totally up to you.

On any region you can place arbitrarily many "content types" like RichText (an HTML field), MediaFile (Images, PDFs, whatever), Applications (3rd party apps), or a number of other content snippets. You also can easily define your own content type, and you probably will, because the builtins won't cover all your use cases.

All in all, I found FeinCMS to be very easy to work with -- it's more a CMS construction set than a ready to use CMS, you have to delve into Python a bit to make it really fly. But then it rewards with tons of flexibility.

Cheers,

        mjl

Gour

unread,
Sep 27, 2012, 5:07:22 AM9/27/12
to django-...@googlegroups.com
On Thu, 27 Sep 2012 10:44:29 +0200
Matthias Kestenholz <m...@feinheit.ch> wrote:

> Just as an example, FeinCMS' ApplicationContent allows the use of an
> unmodified django-registration. What you say isn't wrong however, most
> of the time some adaptation is required if you want to include apps
> via ApplicationContent.

Well, using Zinnia as blog engine within django-cms goes as django-cms
plugin, so I haven't considered that as using 3rd party app...iow. it's
a big one, but it's nice to hear FeinCMS has good capability to
integrate them.

> Yeah, that's exactly the way it's done in FeinCMS:

:-)

> - We use the name `regions`, not `areas`, but that's exactly the same
> - 'content type blocks': We use the same name for that

Very nice.

> Page.register_templates({
> 'title': _('Standard template'),
> 'path': 'feincms_base.html',
> 'regions': [
> ('main', _('Main region')),
> ('sidebar', _('Sidebar'), 'inherited'),
> ('header', _('Header'), 'inherited'),
> ],
> })

Hmm...I must say I haven't expected it's so clean. ;)

> This configuration assumes that you do not want to explicitly add
> sidebar and header content to each and every page -- it's enough to
> define some content on the root page, and all subpages which do not
> override the sidebar and/or header region with their own content
> automatically inherit the content type blocks of their ancestors.

Great!! But it also means one can override specific pages where I do not
want it or want something else?

> No. All you have to do is drag the video (or the tinymce instance) to
> the new place. All content type blocks have dragging handles with
> which you can easily reorder inside one region.

This is kind of front-end editing in FeinCMS? It sounds as another
pleasant surprise.

> I think you wont be disappointed with FeinCMS. It does have a steeper
> learning curve than the other Django-based CMSes, but it also offers
> more flexibility. That may or may not be a good thing for your
> particular use case -- that's your call to make.

I do not mind spending some more time learning which will pay off later
than hitting the wall too quickly and then being forced to migrate to
something else.

I bet that one can easily replace tinymce with something else?

What about using e.g. markdown/reST for the page content and for
(elephant) blog posts?

http://www.djangopackages.com/grids/g/blogs/ page shows that elephant
(aka blog for FeinCMS) lacks support for it as well as no RSS/Atom, no
search, linkback support etc. Is it kind of misleading in a sense that
all those lacking features can be added by integrating 3rd party Django
apps?


Sincerely,
Gour


--
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider
yourself the cause of the results of your activities,
and never be attached to not doing your duty.
signature.asc

Gour

unread,
Sep 27, 2012, 5:14:09 AM9/27/12
to django-...@googlegroups.com
On Thu, 27 Sep 2012 01:45:29 -0700 (PDT)
"Martin J. Laubach" <goo...@emsi.priv.at> wrote:

> In FeinCMS, you generally write a "template page", where you place
> your different regions (header, main, sidebar). That template is just
> a normal Django template, you can use all of Django's built-ins as
> well as anything else that works with Django.

So, it means it's straightforward to 'convert' HTML/CSS/JS template
into native one and use whatever CSS framework one desire (I'm thinking
about YAML)?

> Which regions you have is freely definable, and where you place those
> regions on a page is also totally up to you.

That's cool.

> You also can easily define your own content type, and you probably
> will, because the builtins won't cover all your use cases.

Very, very good...actually it's excellent.

> All in all, I found FeinCMS to be very easy to work with -- it's more
> a CMS construction set than a ready to use CMS, you have to delve
> into Python a bit to make it really fly. But then it rewards with
> tons of flexibility.

Well, with Concrete5 I'm stuck - I'm not inspiring to fiddle with PHP
and learn their MVC framework, and now when something does not work
there is a problem.

That's why I prefer to learn Django and be able to fix/tweak things
according to our needs.

Thank you for your input.

Does FeinCMS work with 1.4.x and what is the plan in regard to 1.5
support 1.5?

Sincerely,
Gour

--
He who is regulated in his habits of eating, sleeping, recreation
and work can mitigate all material pains by practicing the yoga system.
signature.asc

Matthias Kestenholz

unread,
Sep 27, 2012, 5:41:46 AM9/27/12
to django-...@googlegroups.com
On Thu, Sep 27, 2012 at 11:07 AM, Gour <go...@atmarama.net> wrote:
>> This configuration assumes that you do not want to explicitly add
>> sidebar and header content to each and every page -- it's enough to
>> define some content on the root page, and all subpages which do not
>> override the sidebar and/or header region with their own content
>> automatically inherit the content type blocks of their ancestors.
>
> Great!! But it also means one can override specific pages where I do not
> want it or want something else?

Yes; as soon as you add some content to the page no content is
inherited from ancestors anymore.


>> No. All you have to do is drag the video (or the tinymce instance) to
>> the new place. All content type blocks have dragging handles with
>> which you can easily reorder inside one region.
>
> This is kind of front-end editing in FeinCMS? It sounds as another
> pleasant surprise.

TBH the frontend editing in FeinCMS is not really polished. It works, but
what we do most of the time is provide deeplinks into the admin interface
and tell everyone to edit the content there, not directly on-site.

I was referring to this:
<http://feincms-django-cms.readthedocs.org/en/v1.6.0/admin.html#module-feincms.admin.item_editor>


>> I think you wont be disappointed with FeinCMS. It does have a steeper
>> learning curve than the other Django-based CMSes, but it also offers
>> more flexibility. That may or may not be a good thing for your
>> particular use case -- that's your call to make.
>
> I do not mind spending some more time learning which will pay off later
> than hitting the wall too quickly and then being forced to migrate to
> something else.
>
> I bet that one can easily replace tinymce with something else?

Yes; the documentation even comes with a configuration example if
you'd like to use CKeditor instead:

<http://feincms-django-cms.readthedocs.org/en/latest/page.html#wysiwyg-editors>


> What about using e.g. markdown/reST for the page content and for
> (elephant) blog posts?

Of course -- an example for using textile is provided directly on the entry
page of the documentation:
<http://feincms-django-cms.readthedocs.org/en/v1.6.0/index.html>

Markdown/rST is supported in exactly the same way.


> http://www.djangopackages.com/grids/g/blogs/ page shows that elephant
> (aka blog for FeinCMS) lacks support for it as well as no RSS/Atom, no
> search, linkback support etc. Is it kind of misleading in a sense that
> all those lacking features can be added by integrating 3rd party Django
> apps?

The textile content type linked above can be used without modifications for
pages and blog entries. You only have to add the following lines to a
models.py file of your choice (preferrably the models.py file with your
project-specific models):

Page.create_content_type(TextilePageContent)
Entry.create_content_type(TextilePageContent)

(The name of the content type class, "TextilePageContent" is a bit
misleading. There's nothing about this particular content type which prevents
it from being used for blog entries.)

Search should be provided by a third party app (haystack) or even by
integrating Google Site Search or something. The FeinCMS page module
and Elephantblog do not come with search indexes for haystack because
we do not know anything about the content types used etc.

Elephantblog comes with a feed class which can be used with Django's
syndication framework. This sounds like an oversight on the djangopackages
grid.
<https://github.com/feincms/feincms-elephantblog/blob/master/elephantblog/feeds.py>

It's true that Elephantblog has no support for linkback however. That's a bit
unfortunate. Elephantblog can send blogpings by using the
elephantblog.extensions.blogping extension together with pinging:
<https://github.com/matthiask/pinging>



HTH,
Matthias

Gour

unread,
Sep 27, 2012, 5:53:32 AM9/27/12
to django-...@googlegroups.com
On Thu, 27 Sep 2012 11:41:46 +0200
Matthias Kestenholz <m...@feinheit.ch> wrote:

> Yes; as soon as you add some content to the page no content is
> inherited from ancestors anymore.

Good.

> TBH the frontend editing in FeinCMS is not really polished. It works,
> but what we do most of the time is provide deeplinks into the admin
> interface and tell everyone to edit the content there, not directly
> on-site.

TBH, although Concrete5 has frontend editing, I usually login normally
and edit thing in the backend. :-)

> Yes; the documentation even comes with a configuration example if
> you'd like to use CKeditor instead:

Thank you.

> Of course -- an example for using textile is provided directly on the
> entry page of the documentation:
> <http://feincms-django-cms.readthedocs.org/en/v1.6.0/index.html>
>
> Markdown/rST is supported in exactly the same way.

Hmm...it seems I'm better of starting to read the docs.

Considering, I'm new with Django, what steps you recommend to learn
FeinCMS properly?

> (The name of the content type class, "TextilePageContent" is a bit
> misleading. There's nothing about this particular content type which
> prevents it from being used for blog entries.)

Nice.

> Search should be provided by a third party app (haystack) or even by
> integrating Google Site Search or something. The FeinCMS page module
> and Elephantblog do not come with search indexes for haystack because
> we do not know anything about the content types used etc.

I see...

> Elephantblog comes with a feed class which can be used with Django's
> syndication framework. This sounds like an oversight on the
> djangopackages grid.

That's good. :-)

> It's true that Elephantblog has no support for linkback however.
> That's a bit unfortunate. Elephantblog can send blogpings by using the
> elephantblog.extensions.blogping extension together with pinging:
> <https://github.com/matthiask/pinging>

Any plan to add it?

Lastly, what do you think about subscribing FeinCMS group to gmane
(http://gmane.org/)?

Out of many mailing lists I follow, FeinCMS is one of the exceptions
not being subscribed to it. Both Django-CMS & Mezzanine are there.

Moreover, Gmane allows one to just reply to its auth. (TMDA
mechanism) message and post, without the need to subscribe using
horrible Google groups web UI...one uses nntp reader (I use plugin for
Claws mailer) and no need to filter incoming messages, sort them,
automatic archive etc.


Sincerely,
Gour

--
Perform your prescribed duty, for doing so is better than not
working. One cannot even maintain one's physical body without work.
signature.asc

Matthias Kestenholz

unread,
Sep 27, 2012, 6:03:41 AM9/27/12
to django-...@googlegroups.com
On Thu, Sep 27, 2012 at 11:53 AM, Gour <go...@atmarama.net> wrote:
>> Of course -- an example for using textile is provided directly on the
>> entry page of the documentation:
>> <http://feincms-django-cms.readthedocs.org/en/v1.6.0/index.html>
>>
>> Markdown/rST is supported in exactly the same way.
>
> Hmm...it seems I'm better of starting to read the docs.
>
> Considering, I'm new with Django, what steps you recommend to learn
> FeinCMS properly?

- Work through the Django tutorial
- Learn about virtualenv and pip
- Start with the FeinCMS documentation and report stumbling blocks on
the mailing list so that the documentation can be improved :-)


>> It's true that Elephantblog has no support for linkback however.
>> That's a bit unfortunate. Elephantblog can send blogpings by using the
>> elephantblog.extensions.blogping extension together with pinging:
>> <https://github.com/matthiask/pinging>
>
> Any plan to add it?

Well -- I'd say that support for linkback/pingback really really belongs
into a shop software. That being said, I don't have any plans _right now_
to add it.

OTOH if you use disqus for comments you get free support for
trackbacks etc. as well, I think. I don't like Django's built-in commenting
system too much and think that disqus' offering is much better.


> Lastly, what do you think about subscribing FeinCMS group to gmane
> (http://gmane.org/)?

I've submitted a subscription request right now. Let's see what happens.
If it is accepted, the group name will be
gmane.comp.python.django.feincms



Thanks,
Matthias

Gour

unread,
Sep 27, 2012, 6:12:14 AM9/27/12
to django-...@googlegroups.com
On Thu, 27 Sep 2012 12:03:41 +0200
Matthias Kestenholz <m...@feinheit.ch> wrote:

> - Work through the Django tutorial
> - Learn about virtualenv and pip
> - Start with the FeinCMS documentation and report stumbling blocks on
> the mailing list so that the documentation can be improved :-)

Thank you...I'll do. ;)

> OTOH if you use disqus for comments you get free support for
> trackbacks etc. as well, I think. I don't like Django's built-in
> commenting system too much and think that disqus' offering is much
> better.

You're right. Using Disqus seems to solve problem with spam as
well...we'll use it.

> I've submitted a subscription request right now. Let's see what
> happens. If it is accepted, the group name will be
> gmane.comp.python.django.feincms

Thanks a lot.


Sincerely,
Gour


--
One who is not disturbed in mind even amidst the threefold
miseries or elated when there is happiness, and who is free
from attachment, fear and anger, is called a sage of steady mind.
signature.asc
Reply all
Reply to author
Forward
0 new messages