mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #34286 -- Fixed admindocs markups for case-sensitive template/view names.
This commit is contained in:
committed by
Mariusz Felisiak
parent
c626173833
commit
1250483ebf
@@ -101,6 +101,9 @@ ROLES = {
|
||||
|
||||
|
||||
def create_reference_role(rolename, urlbase):
|
||||
# Views and template names are case-sensitive.
|
||||
is_case_sensitive = rolename in ["template", "view"]
|
||||
|
||||
def _role(name, rawtext, text, lineno, inliner, options=None, content=None):
|
||||
if options is None:
|
||||
options = {}
|
||||
@@ -111,7 +114,7 @@ def create_reference_role(rolename, urlbase):
|
||||
urlbase
|
||||
% (
|
||||
inliner.document.settings.link_base,
|
||||
text.lower(),
|
||||
text if is_case_sensitive else text.lower(),
|
||||
)
|
||||
),
|
||||
**options,
|
||||
|
||||
Reference in New Issue
Block a user