I have an existing django application, with which I need to integrate django-cms. Django-cms will be mainly used to create help documents for the application. I've setup django-cms to use my existing database, so as to keep users and auth consistent.
Ideally in a help page, I would be needing client specific information from my existing application, and also provide editing functionality to the documentation team.
Here is a sample view which I wrote:
def view_help(request, company):
try:
c = Company.objects.get(id=company)
except:
return render_to_response('help.html', {'msg':'No Such company'})
return render_to_response('help.html', {'company':c, 'data':c.data})
Corresponding template help.html:
{% load cms_tags %}
{% load custom_tags %}
<!doctype html>
<head>
<title>{{company}}</title>
{% plugins_media %}
</head>
<body>
{% placeholder "main" %}
{% if msg %}
{{msg}}
{% else %}
Here is company specific data: <br/>
{{ data }}
{% endif %}
</body>
</html>
This gives me the company specific information I need, but doesn't give me the cms plugins.
Any help here would be much appreciated. Thanks.
--- Edit --- Moved the edited section to a new question
Django is a framework that helps you to develop a cms. django-cms is already a developed cms to publish a website.
django CMS is a free and open source content management system platform for publishing content on the World Wide Web and intranets. It is written in Django language framework, with Python.
The best choice for you comes down to your needs: django CMS is perfect for enterprises who want to set up an amazing-looking, content-driven website. Wagtail offers additional options for experienced developers who feel confident extending their site's capabilities.
You need to attach the application's view to a cms page using a django-cms apphook.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With