Added kwargs to extern navigation method, instead of passing a modified rel_path
This commit is contained in:
parent
68e89f85a1
commit
e093c48e91
@ -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.
|
||||
|
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user