django-cms

Django CMS and Rosetta: Can't get template messages translated

萝らか妹 提交于 2019-12-13 16:52:32
问题 Is there any know issue about using Django CMS and Django Rosetta together. I cant get the "static" template messages translated although it appears correctly translated in the Rosetta interface. All the dynamic content is correctly translated. Only the one I´ve set up around the `{% trans 'blabla' %} does not work. 回答1: Gotcha! Just add in settings.py LOCALE_PATHS = (BASE_DIR + "/locale/",) It worked for me. 来源: https://stackoverflow.com/questions/24439031/django-cms-and-rosetta-cant-get

Django cms 3.4.1 admin dlogo

浪尽此生 提交于 2019-12-13 06:38:45
问题 I want to change django admin logo. I'm using django cms 3.4.1. I tried to find logos in: cms/templates/cms/ /media/cms/images/cms_toolbar.png All I found was favicon.jpg in myproject/static/django_cms_style/img. I deleted it, but doesnt work. I tried with css too. I hide one logo, but logo in admin page and login page, they are still there. div.cms .cms-toolbar-item-logo a:before { display: none; } 回答1: CMS uses another app for it's admin styling called djangocms-admin-style. and the top of

Django CMS menu, how to set a class to parents only?

十年热恋 提交于 2019-12-13 04:00:00
问题 My menu needs some work. I need to have a class on the parent menu items, but with my recursion, it is not working. This is (part of) my menu: Home Teachers (id teachers) Contact Info Projects myproject yourproject I start with "teachers" like this: {% show_menu_below_id "teqchers" 0 1 0 1 "teachers_menu.html" %} And this is my teachers_menu.html: {% load menu_tags %} {% for child in children %} <li class="{% if child.selected %}selected parent_{{forloop.counter}}{% endif %} {% if child

Python-MySQLdb problem: wrong ELF class: ELFCLASS32

我们两清 提交于 2019-12-12 23:17:31
问题 As part of trying out django CMS (http://www.django-cms.org/), I'm struggling with getting Python-MySQLdb to work (http://pypi.python.org/pypi/MySQL-python/). I have installed Django CMS and all of its dependencies (Python 2.5, Django, django-south, MySQL server) I'm trying out the example code within Django CMS code with MySQL as chosen database type When I execute python manage.py syncdb , the following error occurs: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:

django-cms editors and HTML data attribute cleaned up

末鹿安然 提交于 2019-12-12 14:00:03
问题 Using django-cms 2.4 I need to create pages that contain bootstrap code, but the html5lib used cleans data-* attributes. No matter if you specify valid_element in TINYMCE_DEFAULT_CONFIG. (I still looking for a similar option for Wymeditor), because this is done in #plugins/text/models (clean_html function: https://github.com/divio/django-cms/issues/1529 ) Github issue: https://github.com/divio/django-cms/issues/1529 What could it be a possible workaround? How can I extend the text plugin in

Deploy Django cms on Heruku

廉价感情. 提交于 2019-12-12 09:58:23
问题 I'm trying to deploy a Django CMS on Heruku. I follow the instruction at https://devcenter.heroku.com/articles/git - but when I run the last command this is the result: (web1)users-imac:1web user$ git push heroku master Counting objects: 453, done. Delta compression using up to 4 threads. Compressing objects: 100% (439/439), done. Writing objects: 100% (453/453), 1.21 MiB | 105 KiB/s, done. Total 453 (delta 30), reused 0 (delta 0) -----> Removing .DS_Store files ! Push rejected, no Cedar

Django CMS - check if placeholder is empty

非 Y 不嫁゛ 提交于 2019-12-12 08:01:26
问题 I use: DjangoCMS 2.4 Django 1.5.1 Python 2.7.3 I would like to check if my placeholder is empty. <div> {% placeholder "my_placeholder" or %} {% endplaceholder %} </div> I don't want the html between the placeholder to be created if the placeholder is empty. {% if placeholder "my_placeholder" %} <div> {% placeholder "my_placeholder" or %} {% endplaceholder %} </div> {% endif %} 回答1: There is no built-in way to do this at the moment in django-cms, so you have to write a custom template tag.

error to execute djangocms -f -p . mysite

北城以北 提交于 2019-12-12 02:46:44
问题 I have a problem when I execute djangocms -f -p . mysite the process started but fail when it have to create an admin user. Creating admin user /Users/ccsguest/Site/djangoProject/django1101/bin/python2.7: can't open file 'create_user.py': [Errno 2] No such file or directory The installation has failed. Traceback (most recent call last): File "/Users/ccsguest/Site/djangoProject/django1101/bin/djangocms", line 11, in <module> sys.exit(execute()) File "/Users/ccsguest/Site/djangoProject

Django-Filer FilerImageField how to use widget outside admin

做~自己de王妃 提交于 2019-12-12 02:25:13
问题 I want to use the FilerImageField in one of my model field and want the user to edit outside the admin area but when I try to load it, the widget doesn't work correctly and in the browser console I get and error in the javascript generated: Uncaught TypeError: Cannot read property 'jQuery' of undefined In here: <script type="text/javascript" id="id_featured_image_javascript"> django.jQuery(document).ready(function(){ var plus = django.jQuery('#add_id_featured_image'); if (plus.length){ plus

How to use post_publish signal to publish a related page referenced by show_placeholder?

不羁岁月 提交于 2019-12-11 19:50:00
问题 I am using show_placeholder to display "global" content along my site. For example, a Widget that I use in the sidebar. I did something similar to the suggestions given in this other question. I created a template extra_placeholders.html and a page (with return id "extra-placeholders") in the admin that use extra_placeholders.html to store the placeholders. It is never displayed in the front end but I can access the placeholder of it with {% show_placeholder "my_placeholder" "extra