django-cms

Django-CMS javascript 500 errors

烂漫一生 提交于 2020-01-07 01:52:25
问题 I'm getting three 500 errors when I try to edit a page with django-cms in the admin panel. Here's the error report. Traceback (most recent call last): File "/home/[redacted]/webapps/django/lib/python2.6/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/[redacted]/webapps/django/lib/python2.6/django/contrib/admin/options.py", line 307, in wrapper return self.admin_site.admin_view(view)(*args, **kwargs) File "

django : 404 (main.urls not included in myproject/urls.py?)

被刻印的时光 ゝ 提交于 2020-01-06 19:30:38
问题 I have the following problem : I've made a little django (1.7.8) project (named djangocmstest ) to test django-cms (but it could be related with just django, I'm not sure about this). I try to access localhost:8000/one and get the following issue : Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/one/ Using the URLconf defined in djangocmstest.urls, Django tried these URL patterns, in this order: ^en/ ^media\/(?P<path>.*)$ The current URL, one/, didn't match any of

django : 404 (main.urls not included in myproject/urls.py?)

a 夏天 提交于 2020-01-06 19:30:27
问题 I have the following problem : I've made a little django (1.7.8) project (named djangocmstest ) to test django-cms (but it could be related with just django, I'm not sure about this). I try to access localhost:8000/one and get the following issue : Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/one/ Using the URLconf defined in djangocmstest.urls, Django tried these URL patterns, in this order: ^en/ ^media\/(?P<path>.*)$ The current URL, one/, didn't match any of

How to make filter query in Django?

我只是一个虾纸丫 提交于 2020-01-06 15:33:09
问题 I have the following model.py . I want to create a filter during Input. SubCategory automatically extracted from members Category. While the input current during subcategory will display the entire contents without filter. I want to choose one parent, then just out of the parent's members only. > from django.db import models > > > class Category(models.Model): > > name = models.CharField(max_length=100) > > > > def __unicode__(self): > > return self.name > > > > class SubCategory(models.Model

How to iterate over cms plugin instances from a page in a Django template?

馋奶兔 提交于 2020-01-04 18:32:13
问题 I want to display a list of YouTube videos and let my user edit this list. I thought of doing it like this: Make a template where this will be displayed. In this template do something like <ul>{% for plugin in page %}<li>plugin</li>{% endfor %}</ul> . Make a youtube_videos placeholder and configure it to be limited to only that type of plugin. But I don't know how to make this iteration over the plugin instances in the current page in the template. I didn't see anything about this in django

How to iterate over cms plugin instances from a page in a Django template?

和自甴很熟 提交于 2020-01-04 18:32:08
问题 I want to display a list of YouTube videos and let my user edit this list. I thought of doing it like this: Make a template where this will be displayed. In this template do something like <ul>{% for plugin in page %}<li>plugin</li>{% endfor %}</ul> . Make a youtube_videos placeholder and configure it to be limited to only that type of plugin. But I don't know how to make this iteration over the plugin instances in the current page in the template. I didn't see anything about this in django

Django Multilingual Text Field using JSON

限于喜欢 提交于 2020-01-03 17:18:15
问题 I recently ask this question Custom Django MultilingualTextField model field but I found no good reason why I should not do this, so I create a model Field that support multilingual text, auto return text in current language. This basically is the field that store custom Language object to database in json format. Here is the code: Github: https://github.com/james4388/django-multilingualfield Ussage: from django.db import models from multilingualfield import MLTextField, MLHTMLField class

how to customize menu template in django-cms?

牧云@^-^@ 提交于 2020-01-01 09:06:07
问题 Can anyone supply me a sample of customizing the django-cms menu template, please? I have tried to look for the default menu.html in the cms package folder, but can't find anything. Thanks. 回答1: It's in the menus package. See https://github.com/divio/django-cms/blob/develop/menus/templates/menu/menu.html 来源: https://stackoverflow.com/questions/6893772/how-to-customize-menu-template-in-django-cms

Django CMS Page Title Doesn't Render

大城市里の小女人 提交于 2020-01-01 05:00:06
问题 I'm currently working on a project that uses django-registration and Django CMS. When display the pages that implement django-registration my page titles do not render. Currently have <title>{% page_attribute page_title %}</title> in base.html which all my templates inherit from. In the pages that do not use django-registration the titles display just fine, but django-registration display as <title></title> My pages are all created within the CMS and everything else is rendering correctly. If

How can you create multiple menus with django-cms

大憨熊 提交于 2019-12-31 04:14:05
问题 I'm trying to have two separate menus in my django-cms app. One for the header and another with a different set of links for the footer: [ Logo ] Link_A Link_B Link_C Link_D ... content ... Link_E Link_F Link_G Link_H Using baked in {% show_menu %} , will show all of the pages registered, links A - H, and doesn't allow me to separate the two menus. How can I create two separate menus? 回答1: Depends what you want to do really, but I've got a base template which has a navigation menu at the top