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.
|
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
|
## Integration
|
||||||
|
|
||||||
Clone the library in your django application.
|
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):
|
def context_adaption(context, request, title, rel_path, **kwargs):
|
||||||
context.set_additional_title(title)
|
context.set_additional_title(title)
|
||||||
add_bar = parameter.get(parameter.MYCREOLE_BAR)
|
add_bar = parameter.get(parameter.MYCREOLE_BAR)
|
||||||
next = kwargs.get('next')
|
|
||||||
for key in add_bar:
|
for key in add_bar:
|
||||||
method = add_bar[key]
|
method = add_bar[key]
|
||||||
if method is not None:
|
if method is not None:
|
||||||
if next.find("/", 2) != -1:
|
method(context, request, caller_name="mycreole-attachments", **kwargs)
|
||||||
rp = next[next.find("/", 2) + 1:]
|
|
||||||
else:
|
|
||||||
rp = None
|
|
||||||
method(context, request, caller_name="attachments", rel_path=rp)
|
|
||||||
add_new(request, context[context.ACTIONBAR], rel_path, kwargs.get('next'))
|
add_new(request, context[context.ACTIONBAR], rel_path, kwargs.get('next'))
|
||||||
for key in kwargs:
|
for key in kwargs:
|
||||||
context[key] = kwargs[key]
|
context[key] = kwargs[key]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user