-
-
reviewboard/reviews/templatetags/reviewtags.py (Diff revision 1) We'll want to copy the context and use the copy, as we don't want to mess with the parent context.
Fix problems with {% url %} overrides.
Review Request #2021 — Created Dec. 29, 2010 and submitted
Information | |
---|---|
david | |
Review Board | |
master | |
Reviewers | |
reviewboard | |
Fix problems with {% url %} overrides. There were a couple problems with our override of the url templatetag, which mostly stemmed from the fact that reviewboard.site.templatetags wasn't always being called in every python instance.
-
-
reviewboard/reviews/templatetags/reviewtags.py (Diff revision 2) That'll still update context. Use context.copy().
-
-
reviewboard/reviews/templatetags/reviewtags.py (Diff revision 2) I can't reply because of the jsconsts bug, so here's my answer: "context" here isn't a dict, it's a django.template.Context object, which doesn't have a copy() method, and also doesn't share storage in the same way that dicts do.