Coder Social home page Coder Social logo

bnzk / djangocms-baseplugins Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 649 KB

a common base for consistent djangocms plugin development. includes default plugins.

License: MIT License

Shell 0.07% Python 92.51% HTML 7.18% JavaScript 0.18% CSS 0.07%

djangocms-baseplugins's People

Contributors

benzkji avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

benzkji

djangocms-baseplugins's Issues

better check dependencies and mention them

requests
django-filer
django-mailprotector 
django-ckeditor

if using only a small subset of the plugins (no file fields, no richtext, no special plugins), one could do without those...explain that probably you are gonna need 'em.

download plugin issues

  • fix initial template, to not render download of a section twice
  • when using translated plugins, file should be a translated field
  • fix DOWNLOADPLUGIN_TRANSLATED_FIELDS that is used for DownloadSection

def show_wrapper()

to define if plugin at all is shown.

for example:

def show_wrapper(self):
    if self.image:
        return True

default from baseplugin would still be True. When False, render the empty/hidden plugin template?!

prepare to be used with django-modeltranslation (done, but missing docs/tests)

  • prepare translation.py for each plugin, but dont register them for translation
  • with a setting, registration can be enabled
  • in the same step, it must be ensured that MIGRATION_MODULES is correctly configured. raise ImproperlyConfigured otherwise.
  • docs in general
  • when switching, write about the process: have own MiGRATION_MODULES, and only after the initial migration, enable modeltranslation!
  • bonus: management command to create migration folders for all installed plugins.

contentnav / sitemap plugin

  • show complete sitemap mode
  • depth (1,2,3,4,unlimited)
  • page field, for showing contentnav of another than the current page

separate AbstractBasePluginModel and it's base functionality

ie AbstractBasePluginModelMixin and AbstractBasePluginModel, that form todays AbstractBasePlugin. This would allow to use the basic concept, but without the default fields provided.

The mixin would define a basic API:

  • is_visible
  • str, with usage of self.to_string()
  • add_hidden_flag(text)
  • basic css_classes()
  • basic html_id()
  • html_wrapper_attributes(), using the two above

the model provides:

  • basic (oppiniated) fields, like title, published, layout, color, in_menu, anchor
  • more advanced css_classes, based on the fields
  • some for is_visible
  • inherit from models.Model

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.