Added kwargs to extern navigation method, instead of passing a modified rel_path

This commit is contained in:
Dirk Alders 2024-10-07 12:31:17 +02:00
parent 68e89f85a1
commit e093c48e91
2 changed files with 4 additions and 6 deletions

View File

@ -2,6 +2,9 @@
With the django library mycreole, you are abel to use the creole language to create html output in your django application.
## Requirements
You need to ensure that python-mycreole is available in your python environment.
## Integration
Clone the library in your django application.

View File

@ -20,15 +20,10 @@ NEW_ATTACHMENT_UID = 'new_attachment'
def context_adaption(context, request, title, rel_path, **kwargs):
context.set_additional_title(title)
add_bar = parameter.get(parameter.MYCREOLE_BAR)
next = kwargs.get('next')
for key in add_bar:
method = add_bar[key]
if method is not None:
if next.find("/", 2) != -1:
rp = next[next.find("/", 2) + 1:]
else:
rp = None
method(context, request, caller_name="attachments", rel_path=rp)
method(context, request, caller_name="mycreole-attachments", **kwargs)
add_new(request, context[context.ACTIONBAR], rel_path, kwargs.get('next'))
for key in kwargs:
context[key] = kwargs[key]