0

I am a bit confused on the best way to handle this problem:

My web site needs read-only static web pages (typically the About part of a web site) with 2 simple constraints:

  • they need to be translated
  • they need to have flexible layout: to incorporate base headers/footers, floating images and/or tables, and non-interactive elements (like a bootstrap carousel).

Several solutions that I have thought about:

  • I can of course directly write HTML files but the translation part will be awkward (a lot of <h1>, <ul>, <li> and <p> which are of no interest to the translator).
  • I can use Django flatpages with some markup languages but I lose a lot of flexibility (for instance template tags are not recognized)
  • Use generators like Hyde, but it seems quite overkill for my needs and internationalization seems a bit difficult

Does someone have other propositions that I can look into ?

Thanks !

1 Answers1

1

Use django-cms, it has a Page model that can be translated and has a very smart plugin system to add many content-types into every page.

I use it a lot and it's very easy and yet powerful

For completeness and fairness, here's a full list of available CMS packages for Django.


for a much simpler solution, I would create a model called "Page" with lets say title and text fields.

The title and the text fields I would register to django-modeltranslation which will handle the translation issue.

For the text field i would use TinyMCE which let you insert basically any HTML you want so you can do whatever you need.

YardenST
  • 5,119
  • 2
  • 33
  • 54
  • 1
    Maybe django-cms may have a good solution but adding a whole CMS for just static web pages seems also a bit overkill to me. Thanks, anyway – SaintGermain Oct 07 '13 at 14:44
  • Thanks for looking into it further. With your approach I am not sure that you can use Django templates tags within your TinyMCE admin area. For the moment I am directly using Textile markup embedded in my templates which allows me to specify additional attributes. It is not super elegant, but it works (I still hope for a nicer solution). Thanks, – SaintGermain Oct 07 '13 at 21:52