django-cms

django-cms app hook at homepage error

本秂侑毒 提交于 2019-12-08 12:02:00
问题 I'm playing with django-cms and I want to create an app-hook to an existing application. This is fine if the page I choose to show the app-hook is not the homepage. This is my urls.py for my application that I'm hooking in: from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('films.views', url(r'^$', 'index'), url(r'^(?P<film_id>\d+)/$', 'detail'), ) The cms_app.py is as follows: from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from

Django cms accessing extended property

回眸只為那壹抹淺笑 提交于 2019-12-08 07:41:02
问题 I've extended the Django cms Page model into ExtendedPage model and added page_image to it. How can I now acces the page_image property in a template. I'd like to access the page_image property for every child object in a navigation menu... creating a menu with images... I've extended the admin and I have the field available for editing (adding the picture) from django.db import models from django.utils.translation import ugettext_lazy as _ from cms.models.pagemodel import Page from django

Django cms accessing extended property

落爺英雄遲暮 提交于 2019-12-08 05:13:27
I've extended the Django cms Page model into ExtendedPage model and added page_image to it. How can I now acces the page_image property in a template. I'd like to access the page_image property for every child object in a navigation menu... creating a menu with images... I've extended the admin and I have the field available for editing (adding the picture) from django.db import models from django.utils.translation import ugettext_lazy as _ from cms.models.pagemodel import Page from django.conf import settings class ExtendedPage(models.Model): page = models.OneToOneField(Page, unique=True,

getting error when creating a new django-cms project

六月ゝ 毕业季﹏ 提交于 2019-12-07 13:31:00
问题 I want installing django-cms, but when I want create a new project with this code >>djangocms -p . my_demo I get this error: (myLibrary)Mehradads-MacBook-Pro-3:Workspace mehradad$ djangocms -p . my_demo Database configuration (in URL format) [default sqlite://localhost/project.db]: django CMS version (choices: 2.4, 3.0, stable, develop) [default stable]: Django version (choices: 1.4, 1.5, 1.6, stable) [default stable]: 1.5.8 Activate Django I18N / L10N setting (choices: yes, no) [default yes]

How to deploy mezzanine on heroku?

只愿长相守 提交于 2019-12-07 12:21:01
问题 I have created a mezzanine project and its name is mezzanine-heroku-test I create a Procfile that has the content as follow: web: python manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3 Next, I access to the website to test and I receive the error: Internal Server Error. So, Could you please help me deploy mezzanine on heroku step by step or some suggestion? Thank you so much. 回答1: You should be able to see the error in the logs which you can get to using the heroku tool. heroku logs 回答2: These

Django CMS Multi-Level Dropdown Menu

断了今生、忘了曾经 提交于 2019-12-07 09:56:49
问题 Im kinda new to Django CMS and im trying my best to avoid asking, but this one drives me crazy. I made a Wiki app with a Topic, and Category model. I hooked it to a Site on my CMS and added it to my Menu. Now i would like to be able to show all Top-Level categories, their Child Categories & Topics, and the Child categories of these, and so on, on my menu. Menu/Navigation should look like this: Wiki Category1 Category1.1 Topic Category1.2 Topic Category2 Topic Category3 ... Right now i can

Can't silence warnings that django-cms produces

时光怂恿深爱的人放手 提交于 2019-12-07 04:14:22
问题 I installed Django-cms with the djangocms-installer script, and all works fine except that I get a bunch of RemovedInDjango18Warning warnings in the shell every time I start the server, do anything with manage.py, or even do a manage.py tab-autocomplete (most annoying)! So thought I'd silence the warnings, using warnings module: # in manage.py, just after `import os; import sys`: import warnings warnings.filterwarnings("ignore") I would like to get more specific with the silencing, but it

How to link to language's homepage for untranslated page in django-cms?

空扰寡人 提交于 2019-12-06 05:13:47
问题 Within django-cms I have two languages, with one page in Dutch currently not translated into English. When viewing this page, language_chooser does not provide a link for the English translation (as there is not). However, I would like to link the link to the English translation to link to the homepage (or some other English page if it makes sense). Now I could create the needed template tag myself, or some template trickery, but I think this problem has been solved before. Sadly though, I

Upgrading Django to 1.5 with Django-CMS - user model issue

爷,独闯天下 提交于 2019-12-06 01:58:42
I have just moved a site from Django-CMS 2.3.5 to 2.4.1 (with help from Stackoverflow) under Django 1.4. I am now upgrading to Django 1.5, which is only hard because I need to update the old separate user profile to a new custom user model. I followed the excellent instructions here , and also replaced all references to User with settings.AUTH_USER_MODEL . Unfortunately Django-CMS's models apparently still refer to User though: when I type manage.py runserver , I get this error: CommandError: One or more models did not validate: cms.pagemoderatorstate: 'user' defines a relation with the model

Django-CMS plugin not appearing

独自空忆成欢 提交于 2019-12-05 21:26:38
I'm deploying a Django website. All the custom plugins I have work on my computer (I can add them into a template block from the drop down.) but when I push the code out to the site, not all the plugins are available. The database tables are created, and if I import plugin_pool and call discover_plugins() and then get_all_plugins() the plugins all show up. So my question is, why aren't my plugins showing? Any ideas? Is your app with the plugin ( cms_plugins.py file) in INSTALLED_APPS ? Does it have a models.py (which could be empty) file? Can you import the cms_plugins.py file when using