-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Howto to integrate django-page-cms with another app with custom url #129
Comments
You have 3 options:
In this last case be sure to set those variables properly in your views:
|
I got a similar question about integration. My intention is to use django-page-cms for managing mostly-static content while using custom views for dynamic content. For example, I got "person detail" view which displays profile pages for users on site. Now I want to render profile page and use |
@9dogs it is hard to understand what you want to do exactly... But here are a few remarks:
I don't understand what is the problem here... The CMS is multilingual by default so I don't understand how that doesn't work. I think I starting to understand your need somehow... You want the navigation templates to be decoupled from Pages themselves? For now this CMS doesn't handle things this way... All the navigation templates are assuming a Page hierarchy. But nothing should stop you from developing your own custom tailored template tags. For example the code for the breadcrumb is very simple: https://github.com/batiste/django-page-cms/blob/master/pages/templatetags/pages_tags.py#L238 Why not developing you own and adding your specific use case? e.g. {% user_profile_breadcrumb %}? |
@batiste sorry for obscure description and thanks for the answer! Basically I want to place my own views in Pages navigation mechanism in some consistent way. But you are right, custom template tag/template should do the trick.
It would be great if not at the expense of simplicity and clean design. Django-cms has similar functionality but it will devour any site in no time :). |
@9dogs not that django-page-cms try to have the exact same feature than than Django-CMS, but this navigation abstraction is very simple and could implemented rather easily... Do you want to give it a try? I might have some time in the next month and give a try a as well. |
@9dogs after reading the whole doc on Django-CMS I realised how complex the implementation is... I wonder if there is a sweet spot in implementing something a lot simpler but that provide just enough flexibility to do what you need to do. |
My goal is to manage some pages of our website using django-page-cms.
To do it here is my workflow:
Now where I'm lost is how rendering my page. I read the docs, but from my understanding I can call the corresponding pages using the URL http:///pages/
In my case I wanna manage the URL like I do usually in my urls.py, per example as root document ("/") or for another page with the URL http:///gallery but I didn't find howto do it.
I tried to create my own view:
and in my urls.py I do as usual:
But using this approach permit me to render the template, but not to show the placeholders. I have to use the templatetags {% showcontent...... %} to show the contents because {% placeholder "xxxx" as data %} doesn't work :(
I'm sure that I'm not doing the right way, but I don't see where I'm wrong.
The text was updated successfully, but these errors were encountered: