Tagging support for pages #1412

Closed
xen0n opened this Issue Aug 28, 2012 · 13 comments

Comments

Projects
None yet
5 participants
@xen0n

xen0n commented Aug 28, 2012

As maintainer of the website of my school, I'm often requested to support adding tags to pages so that articles doesn't need to be duplicated in order to appear in multiple categories. So I went to extend the models and wrote a frontend plugin for actually rendering the list.

I'm opening this issue to ask if you upstream staff are willing to accept such a feature enhancement, and the way you'd like to integrate the feature, so I can properly prepare the patch.

Thanks in advance.

@digi604

This comment has been minimized.

Show comment
Hide comment
@digi604

digi604 Aug 28, 2012

Contributor

what are you using for tags?

Contributor

digi604 commented Aug 28, 2012

what are you using for tags?

@xen0n

This comment has been minimized.

Show comment
Hide comment
@xen0n

xen0n Aug 28, 2012

@digi604 Just like in any reasonably decent blog, acting as some kind of "keywords". We are using tags to help post news or announcements in proper categories while maintaining lists of recently published "news" or "announcements", for example.

xen0n commented Aug 28, 2012

@digi604 Just like in any reasonably decent blog, acting as some kind of "keywords". We are using tags to help post news or announcements in proper categories while maintaining lists of recently published "news" or "announcements", for example.

@digi604

This comment has been minimized.

Show comment
Hide comment
@digi604

digi604 Aug 28, 2012

Contributor

i know what you want to use tags for... but do you use a new dependency for this? Are you using django-tagging? What is the dependency?

Contributor

digi604 commented Aug 28, 2012

i know what you want to use tags for... but do you use a new dependency for this? Are you using django-tagging? What is the dependency?

@xen0n

This comment has been minimized.

Show comment
Hide comment
@xen0n

xen0n Aug 28, 2012

@digi604 No, there is no external dependencies besides django-cms itself.

xen0n commented Aug 28, 2012

@digi604 No, there is no external dependencies besides django-cms itself.

@digi604

This comment has been minimized.

Show comment
Hide comment
@digi604

digi604 Aug 28, 2012

Contributor

Would it be possible to implement tagging via plugins? Or why is a change in the page necessary?

Contributor

digi604 commented Aug 28, 2012

Would it be possible to implement tagging via plugins? Or why is a change in the page necessary?

@xen0n

This comment has been minimized.

Show comment
Hide comment
@xen0n

xen0n Aug 28, 2012

The tagging is done in the admin site, so changes to pageadmin are needed. A Django application is used to host the tagged page list view, and also for generating the necessary menu hierarchy. Maybe the app can be removed by moving the menu generation into cms itself, but the change inside pageadmin is obviously necessary to get an "interface" for editing those tags.

I'm not quite into the internals of Django, so please tell me if the admin site integration could be done non-intrusively instead.

xen0n commented Aug 28, 2012

The tagging is done in the admin site, so changes to pageadmin are needed. A Django application is used to host the tagged page list view, and also for generating the necessary menu hierarchy. Maybe the app can be removed by moving the menu generation into cms itself, but the change inside pageadmin is obviously necessary to get an "interface" for editing those tags.

I'm not quite into the internals of Django, so please tell me if the admin site integration could be done non-intrusively instead.

@digi604

This comment has been minimized.

Show comment
Hide comment
@digi604

digi604 Aug 28, 2012

Contributor

Show me some code... its easier that way

Contributor

digi604 commented Aug 28, 2012

Show me some code... its easier that way

@xen0n

This comment has been minimized.

Show comment
Hide comment
@xen0n

xen0n Aug 28, 2012

Just took some time to test that code on latest version of django-cms (the feature was implemented 1 yr. ago) and it seems OK.

The patch is here, please check out. Many places are not cleaned up; I wrote most of the code under a quite tight deployment deadline. Sorry for the inconvenience.

xen0n commented Aug 28, 2012

Just took some time to test that code on latest version of django-cms (the feature was implemented 1 yr. ago) and it seems OK.

The patch is here, please check out. Many places are not cleaned up; I wrote most of the code under a quite tight deployment deadline. Sorry for the inconvenience.

@ojii

This comment has been minimized.

Show comment
Hide comment
@ojii

ojii Sep 14, 2012

Collaborator

-1. instead provide an easy way to attach inlines to pageadmin.

Collaborator

ojii commented Sep 14, 2012

-1. instead provide an easy way to attach inlines to pageadmin.

@neoascetic

This comment has been minimized.

Show comment
Hide comment
@neoascetic

neoascetic Sep 18, 2012

Contributor

...as shown here. But when you attach inlines, they aren't copied when you copy related page (just FYI, if you use pages copying).

@ojii how about official way (and note in docs) about extending base Page model? Also, ability to extend Navigation Nodes will be great too (for page's avatars, for example, shown in menu).

Contributor

neoascetic commented Sep 18, 2012

...as shown here. But when you attach inlines, they aren't copied when you copy related page (just FYI, if you use pages copying).

@ojii how about official way (and note in docs) about extending base Page model? Also, ability to extend Navigation Nodes will be great too (for page's avatars, for example, shown in menu).

@kux

This comment has been minimized.

Show comment
Hide comment
@kux

kux Sep 18, 2012

Contributor

You might want to also check http://github.com/pbs/django-cms-pagetags. I don't know whether it fits all your use cases, but it might be worth looking at.

Contributor

kux commented Sep 18, 2012

You might want to also check http://github.com/pbs/django-cms-pagetags. I don't know whether it fits all your use cases, but it might be worth looking at.

@ojii

This comment has been minimized.

Show comment
Hide comment
@ojii

ojii Sep 18, 2012

Collaborator

absolutely -1 at allowing to extend the page model. this will only cause more trouble. FKs to the page are the way to go (for now), and we should merely make that easier. Allowing to change the page model would mean that we'd end up with a lot of incompatible page models and potential future changes by use the the page model would become harder.

Collaborator

ojii commented Sep 18, 2012

absolutely -1 at allowing to extend the page model. this will only cause more trouble. FKs to the page are the way to go (for now), and we should merely make that easier. Allowing to change the page model would mean that we'd end up with a lot of incompatible page models and potential future changes by use the the page model would become harder.

@digi604

This comment has been minimized.

Show comment
Hide comment
@digi604

digi604 Jul 11, 2013

Contributor

there are plans to have an easy way to extend page and title models in the future... closing as wont fix

Contributor

digi604 commented Jul 11, 2013

there are plans to have an easy way to extend page and title models in the future... closing as wont fix

@digi604 digi604 closed this Jul 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment