FAQ Database Discussion Community


Django-cms/Django SingleRelatedObjectDescriptor instead of object itself

django,django-models,django-cms
I'm trying to make a plugin for django-cms and having issues passing my configuration to the CMSPluginBase class. This is my models.py; from django.db import models from mptt.models import MPTTModel, TreeForeignKey from cms.models.pluginmodel import CMSPlugin class Section(MPTTModel): name = models.CharField(max_length=25, unique=True) parent = TreeForeignKey('self', null=True, blank=True, related_name='children', db_index=True) class MPTTMeta:...

Django CMS losing data from draft to live

django,python-3.x,django-templates,django-cms
I'm creating a carousel plugin using the filer plugin to access easily images. The carousel is simply made with Bootstrap Carousel. The problem is that my carousel is displayed properly in draft but when I pass to live, only the arrow are remaining. When I try to debug with some...

DjangoCMS 3 Filter Available Plugins

django,django-cms
In the DjangoCMS3 documentation it says you can configure DjangoCMS behavior using CMS_PLACEHOLDER_CONF in your settings. For instance: CMS_PLACEHOLDER_CONF = { 'right-column': { 'plugins': ['TextPlugin', 'PicturePlugin'], ... This would make TextPlugin and PicturePlugin to be the only two plugins available inside any placeholder called "right-column". It works, but what if...

Django-CMS 3.0.3 Publishing a page duplicates data from plugin django-cms-saq

django,python-2.7,plugins,django-cms
Django-cms-saq is tested for 2.4.x. I'm trying to update the program to work with 3.0.X. So far, I've updated all the imports but am coming across an unusual error. When I add a question (a plugin) to a page and hit publish, it creates two copies of the question in...

Django CMS bootstrap navbar always collapsed in IE8

django,twitter-bootstrap,internet-explorer-8,django-templates,django-cms
Hello I am developing a django cms for my company but running into issues with the navbar in IE8. using: -Python 2.7.6 -Django (1, 7, 8, 'final', 0) -django-cms 3.1.0 -boostrap 3.3.4 here is my template {% load cms_tags staticfiles sekizai_tags menu_tags %} <!DOCTYPE html> <html> <head> <title>{% block title...

Installing django-cms on Ubuntu 14.04

python,django,ubuntu,pip,django-cms
I've been trying to install django-cms into a virtual environment on Ubuntu. I've exactly followed the installation instructions in the docs (http://django-cms.readthedocs.org/en/support-3.0.x/introduction/install_from_scratch.html) but I keep getting an error after the following command. djangocms -p . mysite Error: Path '.' already exists and is not empty, please choose a different one...

Access django cms Page cache

django-cms
I've got a page extension which can apply a colour to a page. This is accessed via a template tag which checks for an attribute of each page, and at the moment this is just running a Page.objects.filter() call which is obviously hammering the database because this is called for...

Environment error while installing djang-cms on Ubuntu

python,django,ubuntu,pip,django-cms
I get the following error after passing the configuration of Django-cms. A couple of non-python packages seem to be missing. EnvironmentError: Pillow is not compiled with PNG support, see 'Libraries installation issues' documentation section: http://djangocms-installer.readthedocs.org/en/latest/libraries.html. Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section: http://djangocms-installer.readthedocs.org/en/latest/libraries.html From...

django-cms TemplateDoesNotExist INHERIT

django-templates,django-cms
I installed django-cms and configured it according to the documentation. The site comes up, but when I try to add a page I get an error: TemplateDoesNotExist: INHERIT I don't specify INHERIT as a template anywhere. It's finding my template directory ok, but I have no template named INHERIT and...

Django-Haystack with Solr: Searching by page description meta tags

solr,django-haystack,django-cms
I've been digging around and can't seem to find a way to create a search index for the page description meta tags using Haystack and Solr. Does anyone have experience with this, or any tips? I have looked at the page model in cms, but can't figure out how to...

How can I copy CMS pages from a development site to a live site?

python,django,django-cms
I've been integrating Django CMS to a Django project that has been in production already for over a year. As part of my development activities, I've converted to CMS pages those pages that used to be static content before I added Django CMS. My development database now contains pages that...

Django-cms Placeholder naming from template variable

django,django-templates,django-cms
I am working on generating a menu which allows the user to upload an image, and text description, to each subsection of the menu. Here is the current code (custom template for displaying a menu): {% for lowest in lower.children %} {% with lowest.get_menu_title as title %} <div id="product_box"> <div...

django cms: plugin models out of sync with its database tables

python,django,django-south,django-cms
After upgrading django cms from version 2.4.3 to 3.0.11 (currently it's 3.0.12) I have realised that some models are "out of sync" with its database tables. For example: class ProjectPagePluginModel(cmsPlugin): """ CMS project plugin model. """ project = models.ForeignKey(Project, on_delete=CASCADE) max_occurrences = models.PositiveIntegerField(default=0) def __unicode__(self): return self.get_plugin_name() >>> ProjectPagePluginModel.objects.all() Traceback...

After adding Django CMS to my project, management commands fail with a cache error. How can I fix it?

python,django,django-cms,django-cache
This is using Django 1.7 and Django CMS 3.1.0. I've had a large Django project that has been in production for months without any issue. I'm currently adding Django CMS to it and found that if my cache is offline, I cannot issue any management commands without getting an exception....

Custom CMSPlugin migrations in Django 1.7

django,django-cms,django-migrations
I'm using Django CMS 3.1 with Django 1.7.8. I'm trying to upgrade an old project to these respective versions but I'm hitting a brick wall with a couple of my custom-written CMSPlugin-inhereting plugins. Django won't migrate any models. django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [..My Models..] The models are defined as...

Django CMS 3.1 and Django 1.7.8 custom user model

python,django,django-cms
I'm using Django 1.7.8 with DjangoCMS 3.1. I want to add my custom user model. I get exception that my custom model is not registered. I found similar issues but I can't fix it. My project structure: . ├── djangocms │   ├── __init__.py │   ├── __init__.pyc │   ├── settings.py │  ...

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

python,django,django-cms
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...

django-cms: ImportError: No module named cms

django,python-2.7,django-cms
A while ago I worked on a local django-cms project everything worked fine but now when I run python manage.py runserver command i get an ImportError. The only thing i did was to rename the directory where my django project was in. This happens many times when i'm working on...

Integrating Haystack in Django-CMS omitting Pages with View-Restrictions

django,django-haystack,django-cms,whoosh
I want to integrate haystack with django-cms making a search view. My CMS has pages with view restrictions (only a few authenticated users have access to some pages). The problem is: when making a search, haystack gives me list with results from all pages, including pages to which the current...