Coder Social home page Coder Social logo

djangocms-misc's People

Contributors

benzkji avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

benzkji

djangocms-misc's Issues

Autopublish Mode

with a setting, enable draft/live version to be always synced (avoid confusion with live/draft for pages, but not for all other apps!)

  • with signals, always publish a page when a title/page or plugin object is saved
  • keep in mind: plugin tree changed (order, remove/delete, copy paste)!

better toolbar

  • User
    • Change PW
    • Settings
    • Logout
  • Administration
    • Pages
    • Files
    • other custom stuff!
  • Page
    • as is
  • Language
    • as is
  • Clipboard
    • as own menu point

cms 4 compatibility

  • global untranslated placeholders.
  • above, with versioning
  • page_url and other template tags.
  • probably drop autopublisher

page extension: redirect to another page

  • a PageField, that will redirect and even follow, if the target page is moving
  • maybe an option for redirect to first subpage -> no more /firstchild middleware?

textblocks: provide render_model_block enabled template

productivity booster: provide a render_model_block enabled template for django-textblocks.

provide an alternate textblock tag, maybe even plug and replace, so that existing {% load textblock_tags %} automagically get this functionality.

redirect to first subpage

from django.shortcuts import redirect

redirect to first subpage if the "redirect" field is exactly "_subpage"

class RedirectSubpageMiddleware(object):

def process_view(self, request, view_func, view_args, view_kwargs):
    if request.current_page:
        the_page = request.current_page
        the_redirect = the_page.get_redirect()
        # dont know why "slug" in view_kwargs...
        if "slug" in view_kwargs and the_redirect == "_subpage":
            subpages = request.current_page.children.all()[:1]
            if len(subpages)>0:
                # can redirect! must make uri!
                return redirect(subpages[0].get_absolute_url(), permanent=True)
    return None

untranslated placeholders: dirty/needs publish button issues

current state: publish button appears on the language version, on which the plugins where initially added.

  • is this ok!? no!?
  • OR: mark dirty for all languages, so publishing can occur in any language? and clean publisher_state after publishing, for all languages (just publish all languages???!)
  • OR: mark dirty only in the edited language (would be the expected behaviour...but hard to achieve?!)

untranslated placeholders: ensure they plugins always have the same language!

otherwise we'll face tree errors when sorting.

  • use a pre_save signal for cms_cmsplugin creation?
  • OR: rethink untranslated placeholders, as fallbacks, that are always shown (less complex monkey patching!!!).
  • ordering plugins when in other than the plugin's language is generally a problem, as the placehoderadminmixin does some checks - another monkey patch, for move_plugin (adapt placeholder_id, and call the original...) https://github.com/divio/django-cms/blob/release/3.4.x/cms/admin/placeholderadmin.py#L667

testsuite

  • autopublisher: save plugin, move plugin, paste plugin, cut plugin, save page, save title, save/move plugin in static placeholder
  • fetch plugin data tag functionality
  • new toolbar - check that it doesnt break things at least?
  • untranslated placeholder
  • basic page_link tag functionality
  • verify that admin and stuff still load, check for own css

add toolbar helper (permissions, changelist)

same same always.

    def add_crud_menu_item(self, app, model, menu=None, label=None, view='changelist'):
        if not menu:
            menu = self.admin_menu
        if not label:
            label = model
        if self.request.user.has_perm('{}.view_{}'.format(app, model)):
            menu.add_sideframe_item(
                label,
                url=reverse('admin:{}_{}_changelist'.format(app, 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.