Changes between Version 12 and Version 13 of NewAdminChanges
- Timestamp:
- Oct 18, 2005, 5:21:45 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewAdminChanges
v12 v13 13 13 From: 14 14 {{{ 15 #!python 15 16 def style_edit(request, object_id): 16 17 try: … … 43 44 To: 44 45 {{{ 46 #!python 45 47 def style_edit(request, object_id): 46 48 try: … … 91 93 Suppress the field 'name'. 92 94 {{{ 95 #!python 93 96 follow = { 94 97 'name': False, … … 98 101 Show the editable=False field 'job' 99 102 {{{ 100 101 follow = { 'job' : True, } 102 103 103 #!python 104 follow = { 'job' : True, } 104 105 }}} 105 106 106 107 Show the set of related objects in the module 'choices' 107 108 {{{ 109 #!python 108 110 follow = { 109 111 'choices': True, … … 114 116 Show the set of related objects in the module 'choices', but suppress the 'poll' field of each choice object: 115 117 {{{ 116 118 #!python 117 119 follow = { 118 120 'choices': { … … 120 122 } 121 123 } 122 123 124 }}} 124 125 125 126 Put it all together: 126 127 {{{ 128 #!python 127 129 follow = { 128 130 'name' : False, … … 137 139 138 140 {{{ 141 #!python 139 142 def style_edit_inline(request, object_id): 140 143 try: … … 166 169 167 170 return render_to_response('style_edit_inline', { 'form': form }) 168 169 171 }}} 170 172 … … 183 185 184 186 This does require knowing the contents of the context for that template which is undocumented. Also this will probably change to a class to allow more flexibility, eg processing for style/grouping logic etc. 185 186