djangocms-picture | django CMS Picture is a plugin for django CMS | Content Management System library
kandi X-RAY | djangocms-picture Summary
kandi X-RAY | djangocms-picture Summary
django CMS Picture is a plugin for django CMS that allows you to add images on your site.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- URL of the image
- Gets the size of the thumbnail
- Convert a dictionary into django settings
- Split a string
- Return srcset data for this image
- Return cleaned data
- Return alignment
djangocms-picture Key Features
djangocms-picture Examples and Code Snippets
Community Discussions
Trending Discussions on djangocms-picture
QUESTION
I would like to set a default maximum size of images in the djangocms-picture plugin. I would like to do this at template level.
This simple template for example:
...ANSWER
Answered 2021-Apr-13 at 19:28I have solved this one.
Important points- Set the right plugin context: http://docs.django-cms.org/en/latest/how_to/custom_plugins.html?highlight=width#plugin-context
- Be sure the image uses “automatic scaling”.
- Do not use the
tumbnails
plugin directly.
QUESTION
I have developed a simple project with DjangoCMS(3.7.2) and it works great in the local. I 'm gonna run it on a ubuntu server, which I have another Django project run on it with no issues. Both of my projects are built using python 3.6 & MySQL database. I took these steps to run my new project:
- Cloned the project from the server via git and updated the
settings.py
file - Created an empty database on the server
- Installed a virtualenv on server by
python3 -m venv venv
- Activated the
venv
and upgradedpip
- Installed requirements successfully using
pip install -r requirements.txt
- Tried to Migrate by
python3 manage.py migrate
But I got this error:
...ANSWER
Answered 2020-May-01 at 06:06As Alasdair mentioned:
I reinstalled the Django-CMS module by running python3 -m pip install "django-cms==3.7.2"
, and surprisingly it worked.
QUESTION
I had a working DjangoCMS application running DjangoCMS 3.7.1 and Django 2.2, however after I just bumped the DjangoCMS version to 3.7.2 and with it, Django to 3.0.1, I am now getting a render error on a page that I have a simple list view.
The site will load my custom account login page just fine, but once logged in, the listview breaks and displays this error: Traceback
...ANSWER
Answered 2020-Apr-27 at 13:38I ran into the same issue upgrading DjangoCMS to 3.7.2. I believe the context argument was removed in Django 3 (source). The problem for me was djangocms-text-ckeditor doesn't support Django 3 yet. More specifically, HTMLField in my model didn't work. I opened an issue here if you want to comment on it as others have done. Maybe it will get them to fix it sooner. For now, you will probably have to wait till it's fixed. Cheers!
QUESTION
Since the cmsplugin-filer-*-plugins are deprecated with django-cms 3.5, I need a way to keep my plugins with moving them to the newer djangocms-*-plugins.
I am using the cmsplugin-filer plugins FilerFile, FilerFolder and FilerImage. Also I got a custom plugin which inherits from FilerImage. I need to move those to the newer djangocms-file-file, djangocms-file-folder and djangocms-picture without losing my plugins / data.
...ANSWER
Answered 2018-Dec-11 at 08:08After some time working on a migration I came to this solution: https://gist.github.com/wfehr/86ac31e8e263b872b746cc721662251e
The gist provides a migration to move the data between the said third-party-apps and keep alls the plugins/data and change them to the supported ones.
I hope this will help someone facing the same problems:)
(The migration code itself may not be the perfect solution, but it gets the job done)
EDIT:
The linked migration can be used in any application of yours. Just put it in there as the next following migration, for example you have already "0011_added_new_model.py", then put in the file as "0012_filer_deprecation_move.py". Then you have to add the migration 0011 in the dependencies, as seen in other (default) migrations.
TLDR: The above migration is a single, standalone migration. It is called as any other migration with python manage.py migrate [app] [migration]
and you can put it in "any" app you want (where it makes the most sense to you).
QUESTION
I have a Django 1.8.4 site with Django CMS 3.1.3. Via the djangocms-picture plugin I want the editors to be able to upload images to the site. If I upload an image on a page using this plugin, the image ends up in the following folder on the server:
[PATH_TO_APP_ROOT]/media/cms_page_media/8/
Where ‘8’ is the id of the page. When I browse the page, the link to the image is given as
https://[MY_SITE]/media/cms_page_media/8/my_image.png
But this link is not correct and I get a 404. I am having a hard time figuring out what I am missing but it seems that there is some URL setting that should be changed.
In settings.py I have:
...ANSWER
Answered 2018-Jan-12 at 11:57Finally had time to look into this: The problem was that the web server (pythonanywhere) was not configured correctly. In their admin tool, I had to specify the path to media folder. When I did this, it worked, without having to change any Django settings.
more info here: https://help.pythonanywhere.com/pages/DjangoStaticFiles
QUESTION
I have a website, currently running with Django==1.8.6 and Django-CMS 3.0.x (running through upgrades at the moment).
My users can not edit any of the frontend plugins. At the moment I am sure that this is not only true for my custom made plugins, but for ones that come with Django-CMS as well. As a test I have made a new User with all rights and staff status (no superuser). But also this user can't edit or add plugins.
For my search I have found this: https://github.com/divio/djangocms-text-ckeditor/issues/78
I also tested the solution given there as I am using ckeditor, but I don't have an entry for text, so this:
...ANSWER
Answered 2017-Jun-07 at 13:00The answer is after some debugging the permissions.py of the cms, that my sitepermissions where not set properly in the database. Resetting thos in the backend solved the problem.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install djangocms-picture
You can use djangocms-picture 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