django-cms | The easy-to-use and developer-friendly enterprise CMS | Content Management System library
kandi X-RAY | django-cms Summary
kandi X-RAY | django-cms Summary
The easy-to-use and developer-friendly enterprise CMS powered by Django
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Move a plugin
- Remove a node from the list
- Cuts a plugin
- Sends a post placeholder operation
- Publish a page
- Send pre - page pre - object
- Send a post - page operation
- Converts value to true
- Handles editing of the title field
- Adds a plugin to the plugin
- Clear a placeholder
- Sets the page cache header
- Render a changelist form
- Delete a plugin
- Delete objects
- Move a page
- Render the menu context
- Set or create a new object
- Resolve the object
- Copy the content of all drafts
- Check presence of copy_relations
- Delete a translation
- Validates the overwrite_url field
- Returns a list of nodes for the current site
- Return the expiration time for this placeholder
- Moves the page to the given position
django-cms Key Features
django-cms Examples and Code Snippets
Community Discussions
Trending Discussions on django-cms
QUESTION
I have installed a vanilla django-cms on a new server. I installed all requirements. It all went fine, up untill the point where I wanted to migrate to the database (Postgres).
So this is what I did :
- Tried reinstalling and installing it all again. Didn't change it.
- Used google to try and find people with the same error.
- Try editing the signals file on which the error(shown below) fires, but that meant rewriting it all, which still made it unresponsive.
Traceback:
...ANSWER
Answered 2021-Dec-15 at 16:29I found that answer to this problem. If you look at the documentation of Django. It has been Django from 2.0 to 3.0.
Do formerly it was :
QUESTION
I am trying to get custom templates working for djangocms-video.
So far there is a fresh djangocms project set up with some bootstrap and running fine.
According to the readme we would need to specify this in the settings.py to make a custom template available (in this case a template named "feature"):
...ANSWER
Answered 2022-Jan-04 at 21:10In Django, the gettext_lazy(…)
function [Django-doc] is often imported as _
to manage translations. This is explained in the Standard translation:
Python’s standard library
gettext
module installs_()
into the global namespace, as an alias forgettext()
. In Django, we have chosen not to follow this practice, for a couple of reasons(…)
Because of how xgettext (used by makemessages) works, only functions that take a single string argument can be imported as
_
:
You thus should add:
QUESTION
I have a django-cms site, that uses i18n_patterns
in urls.py
. This works, urls are built like /lang/here-starts-the-normal/etc/
.
Now, I would like to have urls like this: /prefix-lang/here-starts...
. As there will be a couple of country specific domains, this wille be like /ch-de/here-...
for Switzerland/.ch domain, /us-en/here-starts....
for the states, and some more. So, when the url would be /ch-de/...
, the LANGUAGE
would still be de
. Hope this is clear?
As the content is filled with existing LANGUAGES=(('de', 'DE'), ('en', 'EN'), ...)
, I cannot change LANGUAGES
for every domain - no content would be found in the cms, modeltranslation, only to mention those two.
How can I prefix the language slug in i18n_patterns
? Is it possible at all?
ANSWER
Answered 2021-Aug-23 at 16:02I think a way without hacking Django too much would be to use URL rewrite facility provided by the webserver you run, for example, for mod_wsgi
you can use mod_rewrite, similar facility exists also for uWSGI
.
You may need to also post-process the output from Django to make sure that any links are also correctly re-written to follow the new schema. Not the cleanest approach but seems doable.
QUESTION
Encounter an error when using djangocms publishing page changes.
when I ran tail -f /var/log/apache2/error.log
, it returned:
ANSWER
Answered 2021-Mar-25 at 08:35Downgrade to django-treebeard version below 4.5.1, e.g. 4.4. Version 4.5.1 seems to be incompatible.
QUESTION
I have a django admin page which is for viewing purposes only and rather than displaying data from the model, it is displaying data for a table linked by a foreignkey to an intermediate table which is linked via a foreign key to my model. I want to apply a date range filter on the third table.
...ANSWER
Answered 2021-Jan-08 at 01:04This is definitely doable, but there are a few things you should consider:
- This isn't really what a change-view is meant for. It feels weird from a UX perspective to have (on a page which is essentially one big form) form-elements unrelated to the form you are submitting.
- django admin is not meant to be a user-facing production ready environment. If you're trying to make it do things it's not easy to do, it's normally a good sign you should be making your own views here.
The modelAdmin.form
attribute, is meant to be a form which displays data from an instance of the relevant model, and which saves the returned POST data back to that same instance.
It isn't the form the view actually uses in the end. It is the form django-admin uses to build the form that is finally used though. The admin app does quite a bit of processing along the way, based off attributes that are set on modelAdmin
so adding (unrelated) fields to modelAdmin.form
won't necessarily correspond to fields on the finally rendered form.
If you want to add in to_date
and from_date
it should be done in a separate form. (For one thing, you otherwise wouldn't be able to change the dates without submitting your whole form).
You are far better to add a separate form, and use GET
query parameters to update your dates. Something like this:
QUESTION
I have a DjangoCMS website to administer. I need to publish a page only for EN language. The issue is that there are 3 more languages, and when I publish the page only for EN, it becomes available in other language menus as well. The menu item name is in English which makes the website look very unprofessional. Is this a DjangoCMS specific weakness of menu logic or poorly coded website?
I found that there are others reporting this issue too - https://github.com/divio/django-cms/issues/6004
How can I exclude unwanted pages to appear on the menu of other languages?
...ANSWER
Answered 2020-Oct-01 at 10:50@lazdins This could be fixed in 3.7.1: "Fixed a bug where the menu would render draft pages even if the page on the request was a public page. This happens when a user without change permissions requests edit mode." https://github.com/divio/django-cms/blob/develop/CHANGELOG.rst#371-2019-11-26
3.4 I also no longer supported, It is advised that you move to 3.7 as it is an LTS release that is currently supported and the recommended version at the time of my comment: https://www.django-cms.org/en/roadmap/
I have posted this into the issue as well. https://github.com/divio/django-cms/issues/6004#issuecomment-702052627
QUESTION
I installed djangocms in existing django project, following the instructions: http://docs.django-cms.org/en/latest/how_to/install.html
but when I run py manage.py cms check
or py manage.py migrate
I have this error:
...File "C:\Users\usuario\Envs\env_cuid_lab\lib\site-packages\cms\forms\fields.py", line 4, in from django.forms.fields import EMPTY_VALUES ImportError: cannot import name 'EMPTY_VALUES' from 'django.forms.fields' (C:\Users\usuario\Envs\env_cuid_lab\lib\site-packages\django\forms\fields.py)
ANSWER
Answered 2020-Oct-14 at 07:24What version of Django are you using?
I assume you are using Django 3.1.2? if so then downgrade to 3.0 because DjangoCMS does not is not compatible with 3.1 at the moment.
This should help : pip install Django==3.0
http://docs.django-cms.org/en/latest/index.html#requirements
QUESTION
I have create a plugin like plugin_pool. But I don't know how to add another plugin in this plugin.
...ANSWER
Answered 2020-Sep-25 at 13:07Your plugin needs to set the allow_children
attribute, and then you can control what children the plugin can have, if you want to, by specifying plugin classes in a list of child_classes
as you'll see below.
QUESTION
I'm completely new to Django CMS and I'm stuck with this issue.
I have added a new module to an existing Django project and created a new Html page. This is the templates configuration in settings.py
...ANSWER
Answered 2020-Jun-29 at 08:44You need to load the editable parts of CMS. Primarily this would be a placeholder so that you can add content via the structure view.
Change newpage.html
to something like;
QUESTION
I currently installed django-cms
and djangocms-blog
. When I run migrate
, it throws the following error. Some ressources suggest to install six
, which however is already satisfied in my venv.
I use the latest Python, pip and django versions.
These are the guides I followed to set up djangocms and djangocms-blog.
Any solution to this?
...ANSWER
Answered 2020-May-09 at 16:36python_2_unicode_compatible
was removed from Django in 3.0: https://docs.djangoproject.com/en/3.0/releases/3.0/#removed-private-python-2-compatibility-apis
It looks like you need to update one of your packages that's using it. From the traceback, that would be aldryn_apphooks_config
. I'm not sure where that comes from, would need some more details for that. I would suggest checking your requirements file and trying to upgrade packages until it works, but you might have to end up removing some.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install django-cms
You can use django-cms like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page