bnzk / djangocms-misc Goto Github PK
View Code? Open in Web Editor NEWcustomizing django and django-cms to my likes
License: MIT License
customizing django and django-cms to my likes
License: MIT License
really, must have it.
implemented, needs tests.
do it
with a setting, enable draft/live version to be always synced (avoid confusion with live/draft for pages, but not for all other apps!)
from here: https://gist.github.com/benzkji/f9a42667939f74646dbf9d9c996884a8
as a mixin (local), and/or contrib app (global)
also crashes in a 404 context. Needs investigation.
some more signals? treebeard?
you'll see them!
better usablility, if all languages get the blue dot.
either use from .conf import settings
approach in templatag, or enable proxy on AppConf object.
PageField
, that will redirect and even follow, if the target page is movingordering and copy pasting is not working when done when fallback plugins are shown, as the plugin's placeholder id is the one from the original language the plugins where added. this is hard! monkey patch ahead :(
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.
from django.shortcuts import redirect
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
current state: publish button appears on the language version, on which the plugins where initially added.
CIT
Text - Text ändern
What the heck :)
otherwise we'll face tree errors when sorting.
move_plugin
(adapt placeholder_id, and call the original...) https://github.com/divio/django-cms/blob/release/3.4.x/cms/admin/placeholderadmin.py#L667blows up everything, otherwise!
to browser the admin log
shoulb be already the case? needs tests anyway.
and write own admin styles, it's just too much and really annoying work
for page and outside page placeholders.
check: pfadi
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)),
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.