Mezzanine web content language translations - django

I have been looking for documentation and information as to how to translate web site content?
We've been using Django CMS for a long time and it gives us two tabs in the admin, i.e : English, Francais and we can toggle between the two to write content in the specific language.
In Mezzanine, I have my LANGUAGES tuple set up with en,fr as well as USE_I18N = True but I don't see how my content editors will be able to create bilingual pages. Any advice?

Mezzanine doesn't support multiple languages by default as Django-CMS does. You need to use 3th party app that can translate models which code you can't touch like django-modeltranslation.
There is an open issue for Mezzanine about Multilanguage support https://github.com/stephenmcd/mezzanine/issues/106
I was created two multilingual sites with my custom app https://github.com/vstoykov/django-magic-translation

Related

Django vs Django-CMS -business compare site

I've developing in django for the past few months and I find it extremely great.
My next project is a price-comparing site for local businesses - where each user can add business and comment on each.
The admin of the site won't be a programmer, but with basic knowledge in web and python.
Should I stick to the old familiar django or should I try it out?
Thanks :)
Matan.
django CMS is built on top of Django and meant to be integrated into existing Django applications or extended with new ones. So your question is flawed.
So instead ask yourself if you need CMS functionality (pages managed by your admins). It sounds like your main app (the compare bit) is better handled by a Django application, but maybe you want the site admin to be able to easily edit the About Us page etc, this is where django CMS could come in handy.

Does django-cms really integrate with django and models

I am migrating an existing small business admin system that uses a variety of spreadsheets and access databases to a Linux server to provide both intranet and internet access to our own office staff, to external partners and to customers.
There is some fairly complex database work which will be using postgreSQL and python.
There needs to be a professional looking public website which can access some of the database content both to generic "customers" and tailored data visibility to actual clients.
None of the traditional CMS offerings like wordpress, drupal, joomla etc seemed flexible enough, so I found my way to django.
I've built models, populated data tables, built some basic views to manipulate the data and started to play a bit with html layout tags and css, and I've started looking at forms including crispy-forms.
I need to work with pdf files - scanning, uploading, splitting into single pages, displaying on the site alongside form data entry etc.
I was hoping that I could use django-cms to handle the aspects of the public facing words and pictures and dealing with the jpgs pdfs etc, and to do the page layout stuff, while using django models and python to simplify the database access and provide the intelligence.
When I read the django-cms docs around integrating models I get the impression that there is not really a proper integration - that you can build a site that switches between cms pages and django pages or maybe embeds a django view into a cms page, but I'm not sure if I can do the look and feel and static bits in cms and the dynamic bits on the same page in django without still having to do the work in django as well.
the django system revolves around the models, the django-cms docs read as if models are some sort of extra bit you might want to use.
There's talk of the different ways to integrate django models but they all treat the django model as a foreign item that can be added.
I've found other people who've asked "how does django-cms work with django models" and the answers seem to be no different from those that ask "how do I ad a django model to a drupal site"
So my question really is - does django-cms integrate with django to provide ease of building sites with good integration between cms features and model features or are they really two separate systems that can share space on the same page with a bit of work but don't play nice together in any useful way?
Is there another tool I can use for my static stuff and page formatting and navigation to integrate with my models and python code?
Yes
Yes, it does integrate with django and it does provide ease of building sites with good integration between cms features and model features. Like comment by Simeon Visser hinted - you can create your own plugins to add managing different features into django cms part. And most often - most things will not need such integration - simple django admin views and models will suffice.

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
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.

django cms - integrate cms and differentiate content via something other than language

New to django...
I have a site with structure /[flavor]/[page] where there are many different flavors and each flavor has roughly the same set of pages. At least at a simple level, this seems to work fine as a django app - flavor can easily become an input to the template for a page.
Now I'm trying to integrate some cms mojo so someone non-technical can easily add/modify content or pages per flavor, and it's not clear how/if django-cms supports this. As far as I can tell, what I want seems similar or equivalent to how django-cms handles languages - in the admin there's a separate tab for each language where you can specify content per language.
For now, my site is English only, so I suppose one option (that doesn't seem too attractive or permanent) is to handle the flavors by pretending they're languages.
I know I can host an arbitrary django app on a cms page that could handle the flavor portion, but the hosted apps don't seem to support adding cms page within them in the same way that languages do.
Being new to django, I'm not wedded to a particular cms, and am open to any suggestions about approach, site structure, etc. as well - the main requirement is to support someone non-technical easily adding/modifying different content/pages for the different flavors.
Thanks!
One option would be to bypass the CMS for the flavor pages and create a Flavor model instead. You could use django-tinymce's HTMLField (https://github.com/aljosa/django-tinymce/blob/master/docs/usage.rst) to allow rich text editing on Flavor fields.

What are some Apps or add ons that get used to customize Django Admin

Im looking for a list or just suggestions on some Django Admin must haves or things that people tend to use.
I'm particularly interested in adding a Wysiwyg or Markdown Editor to the the TextAreas in the Django Admin.
Any suggestions?
There are a number of apps that add wysiwyg editors to Django's admin, such as django-wysiwyg. There are also a couple of articles on this subject in Django's wiki. Some other django apps that are great for admin customization are django-admin-tools and grappelli. Beyond being a general ovehaul of the user interface, grappelli also includes support for the inclusion of a wysiwig editor. And as always, the Django docs are usually a good first stop.
Personanlly, I'm particularly fond of grappelli, it's been used to great effect on a number of Django projects, including mezzanine and a few of my own! Here's a preview of the facelift it gives Django's admin:
Have you take a look at this list ?
I use the django-adimin-tools myself, it lets you create custom menus and custom dashboard as well as custom css. Here is what it looks like pretty much out of the box. Items are draggable. More on that here.
I also used django-admin-bootstrapped which uses twitter bootstrap to make the admin look nicer. more information on it here.
Grapelli is probably the most popular though and I have been using it in my Mezzanine apps but haven't yet tried it in a vanilla Django app as of yet.