django-cms

How to use iframes in django-cms

家住魔仙堡 提交于 2019-12-01 19:55:13
I am looking for a good solution to make it possible for endusers to insert iframes (Soundcloud) in a template placeholder. I thought about using the djangocms-txt-ckeditor plugin. In it documentation it says to use the configurable sanitizer to accomplish this: djangocms-text-ckeditor uses html5lib to sanitize HTML to avoid security issues >and to check for correct HTML code. Sanitisation may strip tags usesful for some >use cases such as iframe; you may customize the tags and attributes allowed by >overriding the TEXT_ADDITIONAL_TAGS and TEXT_ADDITIONAL_ATTRIBUTES settings: TEXT_ADDITIONAL

django-cms + grappelli

北慕城南 提交于 2019-12-01 16:19:52
If anyone knows how to make django-cms play with grappelli, please give some tips Well I've just gone through a fairly epic adventure, the story of which might be of some use to you. The end point of said adventure was getting django-cms 2.1.3 working with django-filebrowser-no-grappelli . Whilst that may sound in fact like the opposite of what you want, I ended up there because what I really wanted was to get django-cms working with filebrowser. Without grappelli though the standard django-filebrowser does not work as expected. But with grappelli django-cms does not work as expected. So

undefined uploads using django cms cmsplugin_filer_file and cmsplugin_filer_image

元气小坏坏 提交于 2019-12-01 13:00:59
I have just started using django-cms so please forgive my newbieness. Every time i try to upload a file in the admin area, for example an image file using cmsplugin_filer_file' / cmsplugin_filer_image it comes up as undefined in the clipboard area. It’s strange because the running dots appear as if it is loading the image then bang image undefined. It allows me to create folders but I cannot view uploaded files. On closer inspection the image has been uploaded to a directory under today’s date in media / filer dir (i.e media/filer/2012/03/27) however, no files are displayed in admin. Could it

django-cms: urls used by apphooks don't work with reverse() or {% url %}

落爺英雄遲暮 提交于 2019-11-30 06:54:44
I'm using django-cms with apphooks to display book detail information. I need the page with the app hook to accept a slug that specifies which book to display. I created a page called 'books' and added the apphook 'BookDetailApp'. Here's what my books.cms_app file looks like: class BooksApp (CMSApp): name = _('Book Detail Page Application') urls = ['books.urls'] apphook_pool.register(BooksApp) Here's what my books.urls looks like: urlpatterns = patterns('', url(r'^(?P<slug>[\w\-]+)?', BookDetailView.as_view(), name='book_detail'), ) And here's what my books.views file looks like: class

How to remove the language identifier from django-cms 2.4 URLs?

巧了我就是萌 提交于 2019-11-30 06:45:40
问题 I have followed the tutorial to make a new Django-CMS (2.4) site. I am only using a single language (English). There is an automatic redirect to include the language identifier '/en/' in my site's URLs. How do I remove it? thanks. 回答1: replace this pattern registration: urlpatterns = i18n_patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('cms.urls')), ) with this: from django.conf.urls import patterns urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls))

How to add a custom template page to mezzanine?

倾然丶 夕夏残阳落幕 提交于 2019-11-30 04:55:35
问题 I've been playing around with mezzanine for a couple days and I've been following this blog, which has been very helpful. I'm now at the point where I need to make a bunch of pages that need to be based off of a custom template. My custom template is called content.html I've put it in myProject > myApp/theme folder > templates > pages > content.html but when I look in the admin console, I don't see content in the drop down menu. How do I get mezzanine to recognize my content.html page as a

django-cms: urls used by apphooks don't work with reverse() or {% url %}

廉价感情. 提交于 2019-11-29 07:28:56
问题 I'm using django-cms with apphooks to display book detail information. I need the page with the app hook to accept a slug that specifies which book to display. I created a page called 'books' and added the apphook 'BookDetailApp'. Here's what my books.cms_app file looks like: class BooksApp (CMSApp): name = _('Book Detail Page Application') urls = ['books.urls'] apphook_pool.register(BooksApp) Here's what my books.urls looks like: urlpatterns = patterns('', url(r'^(?P<slug>[\w\-]+)?',

How to remove the language identifier from django-cms 2.4 URLs?

ぐ巨炮叔叔 提交于 2019-11-28 21:24:55
I have followed the tutorial to make a new Django-CMS (2.4) site. I am only using a single language (English). There is an automatic redirect to include the language identifier '/en/' in my site's URLs. How do I remove it? thanks. replace this pattern registration: urlpatterns = i18n_patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('cms.urls')), ) with this: from django.conf.urls import patterns urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('cms.urls')), ) The tutorial you pointed to uses the i18n_patterns method which does

How to add some extra fields to the page in django-cms? (in django admin panel)

我的梦境 提交于 2019-11-28 06:31:09
I would like to add some extra fields to pages in django-cms (in django admin panel). How do this in the simplest way? Timmy O'Mahony Create a new app (called extended_cms or something) and in models.py create the following: from django.db import models from django.utils.translation import ugettext_lazy as _ from cms.models.pagemodel import Page class ExtendedPage(models.Model): page = models.ForeignKey(Page, unique=True, verbose_name=_("Page"), editable=False, related_name='extended_fields') my_extra_field = models.CharField(...) then create an admin.py : from models import ExtendedPage from

Getting error while running django-cms demo page

守給你的承諾、 提交于 2019-11-28 05:09:15
I tried all of the procedure for installing django-cms, after that when i try to run a demo page i getting the below error. (djvenv2)shan@shan:~/workspace/projects/djvenv$ pip freeze Django==1.6.2 PIL==1.1.7 Pillow==2.4.0 South==0.8.4 argparse==1.2.1 dj-database-url==0.3.0 django-classy-tags==0.5.1 django-cms==3.0 django-mptt==0.6.0 django-sekizai==0.7 djangocms-admin-style==0.2.2 djangocms-installer==0.4.1 html5lib==0.999 six==1.6.1 wsgiref==0.1.2 (djvenv2)shan@shan:~/workspace/projects/djvenv$ djangocms -p . my_demo Database configuration (in URL format) [default sqlite://localhost/project