Perform link request resolution the new faster way and fallback to the old method.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -286,7 +286,9 @@ class Link(object):
|
||||
app_label='acls', model_name='AccessControlList'
|
||||
)
|
||||
|
||||
request = context.request
|
||||
request = getattr(
|
||||
context, 'request', Variable('request').resolve(context)
|
||||
)
|
||||
current_path = request.META['PATH_INFO']
|
||||
current_view = resolve(current_path).view_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user