Changes between Version 17 and Version 18 of ShortcutSyntaxIdeas
- Timestamp:
- Sep 22, 2005, 5:05:14 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ShortcutSyntaxIdeas
v17 v18 99 99 from django.views.decorators.shortcuts import use_template 100 100 101 class AClass(BaseClass):101 class ViewClass(BaseClass): 102 102 #class level attributes here (e.g. for the menu generation - see below) 103 103 104 @use_template('p rimes/index')105 def p rime_index(request):104 @use_template('page_one') 105 def page_one(request): 106 106 return { 107 107 'title': 'Page Title', 108 'primes': [2, 3, 5, 7], 109 'header': 'The first 4 primes' 108 # other data 109 } 110 111 @use_template('page_two') 112 def page_two(request): 113 return { 114 'title': 'Page Title', 115 # other data 110 116 } 111 117 }}}