jeffci
jeffci

Reputation: 2622

Integrate existing blog code into Django-CMS?

If I already have a blog app done with Django and I want to use it with my new Django CMS site, is it okay to simply drop it into my new Django CMS project as a decoupled app and match anything /blog/ to the blog app as apposed to a Django CMS plugin? I guess what I need to know is when is it best to write my Django app as a plugin vs an entire app?

Thx

JeffC

Upvotes: 1

Views: 552

Answers (1)

Timmy O'Mahony
Timmy O'Mahony

Reputation: 53998

Yes, but you don't just drop it into the urls.py, instead you can write an AppHook to tie your blog's URL scheme to a particular page in your CMS.

Plugins on the other hand are useful if you want to inserts particular aspects of you app into other page's placeholders - for example to show your latest 3 posts on the frontpage.

You might also want to include your blog's paths in a breadcrumb or menu on your site - in that case you need to write a custom Menu too.

Finally, it might also be useful to make use of django cms's placeholders in you blog model. His would allow you to post a variety of content via plugins.

Upvotes: 3

Related Questions