Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add reST role to templates named in some view docs.

This makes the templates link up correctly in the admindocs.
  • Loading branch information...
commit 24dec9edaac7849c7831ff0ee4245b6637a9639e 1 parent fa182e8
Ben Spaulding authored June 26, 2012
6  django/contrib/comments/views/moderation.py
@@ -17,7 +17,7 @@ def flag(request, comment_id, next=None):
17 17
     """
18 18
     Flags a comment. Confirmation on GET, action on POST.
19 19
 
20  
-    Templates: `comments/flag.html`,
  20
+    Templates: :template:`comments/flag.html`,
21 21
     Context:
22 22
         comment
23 23
             the flagged `comments.comment` object
@@ -43,7 +43,7 @@ def delete(request, comment_id, next=None):
43 43
     Deletes a comment. Confirmation on GET, action on POST. Requires the "can
44 44
     moderate comments" permission.
45 45
 
46  
-    Templates: `comments/delete.html`,
  46
+    Templates: :template:`comments/delete.html`,
47 47
     Context:
48 48
         comment
49 49
             the flagged `comments.comment` object
@@ -70,7 +70,7 @@ def approve(request, comment_id, next=None):
70 70
     Approve a comment (that is, mark it as public and non-removed). Confirmation
71 71
     on GET, action on POST. Requires the "can moderate comments" permission.
72 72
 
73  
-    Templates: `comments/approve.html`,
  73
+    Templates: :template:`comments/approve.html`,
74 74
     Context:
75 75
         comment
76 76
             the `comments.comment` object for approval
2  django/contrib/comments/views/utils.py
@@ -56,7 +56,7 @@ def confirmed(request):
56 56
     confirmed.__doc__ = textwrap.dedent("""\
57 57
         %s
58 58
 
59  
-        Templates: `%s``
  59
+        Templates: :template:`%s``
60 60
         Context:
61 61
             comment
62 62
                 The posted comment
2  django/contrib/flatpages/views.py
@@ -23,7 +23,7 @@ def flatpage(request, url):
23 23
 
24 24
     Models: `flatpages.flatpages`
25 25
     Templates: Uses the template defined by the ``template_name`` field,
26  
-        or `flatpages/default.html` if template_name is not defined.
  26
+        or :template:`flatpages/default.html` if template_name is not defined.
27 27
     Context:
28 28
         flatpage
29 29
             `flatpages.flatpages` object
6  django/views/defaults.py
@@ -12,7 +12,7 @@ def page_not_found(request, template_name='404.html'):
12 12
     """
13 13
     Default 404 handler.
14 14
 
15  
-    Templates: `404.html`
  15
+    Templates: :template:`404.html`
16 16
     Context:
17 17
         request_path
18 18
             The path of the requested URL (e.g., '/app/pages/bad_page/')
@@ -26,7 +26,7 @@ def server_error(request, template_name='500.html'):
26 26
     """
27 27
     500 error handler.
28 28
 
29  
-    Templates: `500.html`
  29
+    Templates: :template:`500.html`
30 30
     Context: None
31 31
     """
32 32
     t = loader.get_template(template_name) # You need to create a 500.html template.
@@ -41,7 +41,7 @@ def permission_denied(request, template_name='403.html'):
41 41
     """
42 42
     Permission denied (403) handler.
43 43
 
44  
-    Templates: `403.html`
  44
+    Templates: :template:`403.html`
45 45
     Context: None
46 46
 
47 47
     If the template does not exist, an Http403 response containing the text

0 notes on commit 24dec9e

Please sign in to comment.
Something went wrong with that request. Please try again.