GithubHelp home page GithubHelp logo

django-cms / djangocms-bootstrap5 Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 6.0 173 KB

django CMS Bootstrap 5 is a plugin bundle for django CMS providing several components from the popular Bootstrap 5 framework.

Home Page: https://django-cms.org

License: Other

JavaScript 14.82% Python 72.77% HTML 6.27% SCSS 6.15%

djangocms-bootstrap5's Introduction

django CMS

Code Climate

Open source enterprise content management system based on the Django framework and backed by the non-profit django CMS Association (Sponsor us!).

Contribute to this project and win rewards

Because django CMS is a community-driven project, we welcome everyone to get involved in the project. Become part of a fantastic community and help us make django CMS the best open source CMS in the world.

Attention!

Please use the develop-4 branch as the target for pull requests for on-going development.

Security fixes will be backported to older branches by the core team as appropriate.

Features

  • hierarchical pages
  • extensive built-in support for multilingual websites
  • multi-site support
  • draft/publish workflows
  • version control
  • a sophisticated publishing architecture, that's also usable in your own applications
  • frontend content editing
  • a hierarchical content structure for nested plugins
  • an extensible navigation system that your own applications can hook into
  • SEO-friendly URLs
  • designed to integrate thoroughly into other applications

Developing applications that integrate with and take advantage of django CMS features is easy and well-documented.

More information on our website.

Requirements

See the Python/Django requirements for the current release version in our documentation.

See the installation how-to guide for an overview of some other requirements and dependencies of the current release.

Getting started

These tutorials take you step-by-step through some key aspects of django CMS.

Documentation

Our documentation working group maintains documentation for several versions of the project. Key versions are:

  • stable (default), for the current release version
  • latest, representing the latest build of the develop-4 branch

For more information about our branch policy, see Branches.

Our documentation is hosted courtesy of Read the Docs.

The dependencies for the docs are compiled by pip-tools.

Test django CMS in our demo

The demo platform is kindly provided by Divio, platinum member of the django CMS Association.

Try demo with Divio Cloud

Getting Help

Please head over to our Discord Server or Stackoverflow for support.

Professional support

Choose from a list of trusted tech partner of the django CMS Association to get your website project delivered successfully.

Choose a trusted web host for your django CMS project and get your website online today.

The django CMS Association

The django CMS Association is a non-profit organization that was founded in 2020 with the goal to drive the success of django CMS, by increasing customer happiness, market share and open-source contributions. We provide infrastructure and guidance for the django CMS project.

The non-profit django CMS Association is dependent on donations to fulfill its purpose. The best way to donate is to become a member of the association and pay membership fees. The funding will be funneled back into core development and community projects.

Join the django CMS Association.

Credits

djangocms-bootstrap5's People

Contributors

crydotsnake avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

djangocms-bootstrap5's Issues

Error during installation

Hi, hope someone can assist.

I am pretty new to Django CMS. I am trying to install this bootstrap-5 stuff, however during install when I have
cms.exceptions.PluginAlreadyRegistered: Cannot register <class 'djangocms_link.cms_plugins.LinkPlugin'>, a plugin with this name ('LinkPlugin') is already registered.

If I remove 'djangocms_link', listed in my INSTALLED_APPS I get the error below when running python manage.py migrate

RuntimeError: Model class djangocms_link.models.Link doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

Can anyone help please
Thanks

Block button rendering method is incorrect

In versions of Bootstrap prior to 5, the way to make a block button was to add the btn-block class.

This is no longer the approach - instead the button should be contained in a div as documented here

link + picture: Add exception handling for unregister_plugin.

Both link and picture plugin unregister their original django-cms version.
However there are neither checks if the plugin is still registered nor exception handling causing a cms.exceptions.PluginNotRegistered: The plugin <class 'djangocms_picture.cms_plugins.[PicturePlugin|LinkPlugin]'> is not registered-Exception. This happens for example if bootstrap4_link or bootstrap4_picture are used in the same project.

Djangocms-bootstrap 5 creates problems with Django 4.2

Hi,
In my experience, I am having problems with the bootstrap5-grid plugin. In django 4

from django.utils.translation import gettext_lazy as _
from django.utils.translation import ungettext

In the code of Bootstrap5 Grid plugin models.py file I had to change ungettext to ngettex as django does not use ungettext, ngettext instead.

After that now I am getting problems while creating a Grid, because of help_text field.

<h1>TypeError
       at /admin/cms/staticplaceholder/add-plugin/</h1>
  <pre class="exception_value">__str__ returned non-string (type __proxy__)</pre>
  

Request Method: | GET
-- | --
Environment:


Request Method: GET
Request URL: http://abctasarim.com/admin/cms/staticplaceholder/add-plugin/?placeholder_id=15&plugin_type=Bootstrap5GridContainerPlugin&cms_path=/?structure&plugin_language=tr

Django Version: 4.2
Python Version: 3.11.3
Installed Applications:
['djangocms_admin_style',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'cms',
 'menus',
 'treebeard',
 'sekizai',
 'flags',
 'filer',
 'easy_thumbnails',
 'mptt',
 'parler',
 'djangocms_file',
 'djangocms_picture',
 'djangocms_video',
 'djangocms_googlemap',
 'djangocms_snippet',
 'djangocms_style',
 'djangocms_icon',
 'djangocms_link',
 'djangocms_text_ckeditor',
 'djangocms_bootstrap5',
 'djangocms_bootstrap5.contrib.bootstrap5_alerts',
 'djangocms_bootstrap5.contrib.bootstrap5_badge',
 'djangocms_bootstrap5.contrib.bootstrap5_card',
 'djangocms_bootstrap5.contrib.bootstrap5_carousel',
 'djangocms_bootstrap5.contrib.bootstrap5_collapse',
 'djangocms_bootstrap5.contrib.bootstrap5_content',
 'djangocms_bootstrap5.contrib.bootstrap5_grid',
 'djangocms_bootstrap5.contrib.bootstrap5_jumbotron',
 'djangocms_bootstrap5.contrib.bootstrap5_link',
 'djangocms_bootstrap5.contrib.bootstrap5_listgroup',
 'djangocms_bootstrap5.contrib.bootstrap5_media',
 'djangocms_bootstrap5.contrib.bootstrap5_picture',
 'djangocms_bootstrap5.contrib.bootstrap5_tabs',
 'djangocms_bootstrap5.contrib.bootstrap5_utilities',
 'luftchem.apps.base',
 'luftchem.apps.products']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware',
 'cms.middleware.utils.ApphookReloadMiddleware']


Template error:
In template /home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/contrib/admin/templates/admin/includes/fieldset.html, error at line 26
   __str__ returned non-string (type __proxy__)
   16 :                                 {{ field.label_tag }}
   17 :                                 {% if field.is_readonly %}
   18 :                                     <div class="readonly">{{ field.contents }}</div>
   19 :                                 {% else %}
   20 :                                     {{ field.field }}
   21 :                                 {% endif %}
   22 :                             {% endif %}
   23 :                         </div>
   24 :                     {% if field.field.help_text %}
   25 :                         <div class="help"{% if field.field.id_for_label %} id="{{ field.field.id_for_label }}_helptext"{% endif %}>
   26 :                             <div> {{ field.field.help_text | safe  }} </div>
   27 :                         </div>
   28 :                     {% endif %}
   29 :                 </div>
   30 :             {% endfor %}
   31 :             {% if not line.fields|length == 1 %}</div>{% endif %}
   32 :         </div>
   33 :     {% endfor %}
   34 : </fieldset>
   35 : 

Traceback (most recent call last):
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/core/handlers/base.py", line 220, in _get_response
    response = response.render()
               ^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/response.py", line 111, in render
    self.content = self.rendered_content
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/response.py", line 89, in rendered_content
    return template.render(context, self._request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 175, in render
    return self._render(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/loader_tags.py", line 157, in render
    return compiled_parent._render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/loader_tags.py", line 157, in render
    return compiled_parent._render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/loader_tags.py", line 157, in render
    return compiled_parent._render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
    result = block.nodelist.render(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
    result = block.nodelist.render(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/defaulttags.py", line 238, in render
    nodelist.append(node.render_annotated(context))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/loader_tags.py", line 208, in render
    return template.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 177, in render
    return self._render(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/defaulttags.py", line 238, in render
    nodelist.append(node.render_annotated(context))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/defaulttags.py", line 238, in render
    nodelist.append(node.render_annotated(context))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/defaulttags.py", line 321, in render
    return nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 1064, in render
    output = self.filter_expression.resolve(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/base.py", line 742, in resolve
    new_obj = func(obj, *arg_vals)
              ^^^^^^^^^^^^^^^^^^^^
  File "/home/ytsejam/.virtualenvs/luftchem/lib/python3.11/site-packages/django/template/defaultfilters.py", line 47, in _dec
    first = str(first)
            ^^^^^^^^^^

Exception Type: TypeError at /admin/cms/staticplaceholder/add-plugin/
Exception Value: __str__ returned non-string (type __proxy__)


Can we fix the help_text field?

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.