1 |
|
---|
2 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|
3 | <html lang="en">
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="content-type" content="text/html; charset=utf-8">
|
---|
6 | <meta name="robots" content="NONE,NOARCHIVE">
|
---|
7 | <title>AttributeError at /admin/edittest/mymodel/</title>
|
---|
8 | <style type="text/css">
|
---|
9 | html * { padding:0; margin:0; }
|
---|
10 | body * { padding:10px 20px; }
|
---|
11 | body * * { padding:0; }
|
---|
12 | body { font:small sans-serif; }
|
---|
13 | body>div { border-bottom:1px solid #ddd; }
|
---|
14 | h1 { font-weight:normal; }
|
---|
15 | h2 { margin-bottom:.8em; }
|
---|
16 | h2 span { font-size:80%; color:#666; font-weight:normal; }
|
---|
17 | h3 { margin:1em 0 .5em 0; }
|
---|
18 | h4 { margin:0 0 .5em 0; font-weight: normal; }
|
---|
19 | table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; }
|
---|
20 | tbody td, tbody th { vertical-align:top; padding:2px 3px; }
|
---|
21 | thead th { padding:1px 6px 1px 3px; background:#fefefe; text-align:left; font-weight:normal; font-size:11px; border:1px solid #ddd; }
|
---|
22 | tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; }
|
---|
23 | table.vars { margin:5px 0 2px 40px; }
|
---|
24 | table.vars td, table.req td { font-family:monospace; }
|
---|
25 | table td.code { width:100%; }
|
---|
26 | table td.code div { overflow:hidden; }
|
---|
27 | table.source th { color:#666; }
|
---|
28 | table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }
|
---|
29 | ul.traceback { list-style-type:none; }
|
---|
30 | ul.traceback li.frame { margin-bottom:1em; }
|
---|
31 | div.context { margin: 10px 0; }
|
---|
32 | div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; }
|
---|
33 | div.context ol li { font-family:monospace; white-space:pre; color:#666; cursor:pointer; }
|
---|
34 | div.context ol.context-line li { color:black; background-color:#ccc; }
|
---|
35 | div.context ol.context-line li span { float: right; }
|
---|
36 | div.commands { margin-left: 40px; }
|
---|
37 | div.commands a { color:black; text-decoration:none; }
|
---|
38 | #summary { background: #ffc; }
|
---|
39 | #summary h2 { font-weight: normal; color: #666; }
|
---|
40 | #explanation { background:#eee; }
|
---|
41 | #template, #template-not-exist { background:#f6f6f6; }
|
---|
42 | #template-not-exist ul { margin: 0 0 0 20px; }
|
---|
43 | #unicode-hint { background:#eee; }
|
---|
44 | #traceback { background:#eee; }
|
---|
45 | #requestinfo { background:#f6f6f6; padding-left:120px; }
|
---|
46 | #summary table { border:none; background:transparent; }
|
---|
47 | #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
|
---|
48 | #requestinfo h3 { margin-bottom:-1em; }
|
---|
49 | .error { background: #ffc; }
|
---|
50 | .specific { color:#cc3300; font-weight:bold; }
|
---|
51 | h2 span.commands { font-size:.7em;}
|
---|
52 | span.commands a:link {color:#5E5694;}
|
---|
53 | pre.exception_value { font-family: sans-serif; color: #666; font-size: 1.5em; margin: 10px 0 10px 0; }
|
---|
54 | </style>
|
---|
55 | <script type="text/javascript">
|
---|
56 | //<!--
|
---|
57 | function getElementsByClassName(oElm, strTagName, strClassName){
|
---|
58 | // Written by Jonathan Snook, http://www.snook.ca/jon; Add-ons by Robert Nyman, http://www.robertnyman.com
|
---|
59 | var arrElements = (strTagName == "*" && document.all)? document.all :
|
---|
60 | oElm.getElementsByTagName(strTagName);
|
---|
61 | var arrReturnElements = new Array();
|
---|
62 | strClassName = strClassName.replace(/\-/g, "\-");
|
---|
63 | var oRegExp = new RegExp("(^|\s)" + strClassName + "(\s|$)");
|
---|
64 | var oElement;
|
---|
65 | for(var i=0; i<arrElements.length; i++){
|
---|
66 | oElement = arrElements[i];
|
---|
67 | if(oRegExp.test(oElement.className)){
|
---|
68 | arrReturnElements.push(oElement);
|
---|
69 | }
|
---|
70 | }
|
---|
71 | return (arrReturnElements)
|
---|
72 | }
|
---|
73 | function hideAll(elems) {
|
---|
74 | for (var e = 0; e < elems.length; e++) {
|
---|
75 | elems[e].style.display = 'none';
|
---|
76 | }
|
---|
77 | }
|
---|
78 | window.onload = function() {
|
---|
79 | hideAll(getElementsByClassName(document, 'table', 'vars'));
|
---|
80 | hideAll(getElementsByClassName(document, 'ol', 'pre-context'));
|
---|
81 | hideAll(getElementsByClassName(document, 'ol', 'post-context'));
|
---|
82 | hideAll(getElementsByClassName(document, 'div', 'pastebin'));
|
---|
83 | }
|
---|
84 | function toggle() {
|
---|
85 | for (var i = 0; i < arguments.length; i++) {
|
---|
86 | var e = document.getElementById(arguments[i]);
|
---|
87 | if (e) {
|
---|
88 | e.style.display = e.style.display == 'none' ? 'block' : 'none';
|
---|
89 | }
|
---|
90 | }
|
---|
91 | return false;
|
---|
92 | }
|
---|
93 | function varToggle(link, id) {
|
---|
94 | toggle('v' + id);
|
---|
95 | var s = link.getElementsByTagName('span')[0];
|
---|
96 | var uarr = String.fromCharCode(0x25b6);
|
---|
97 | var darr = String.fromCharCode(0x25bc);
|
---|
98 | s.innerHTML = s.innerHTML == uarr ? darr : uarr;
|
---|
99 | return false;
|
---|
100 | }
|
---|
101 | function switchPastebinFriendly(link) {
|
---|
102 | s1 = "Switch to copy-and-paste view";
|
---|
103 | s2 = "Switch back to interactive view";
|
---|
104 | link.innerHTML = link.innerHTML == s1 ? s2 : s1;
|
---|
105 | toggle('browserTraceback', 'pastebinTraceback');
|
---|
106 | return false;
|
---|
107 | }
|
---|
108 | //-->
|
---|
109 | </script>
|
---|
110 | </head>
|
---|
111 | <body>
|
---|
112 | <div id="summary">
|
---|
113 | <h1>AttributeError at /admin/edittest/mymodel/</h1>
|
---|
114 | <pre class="exception_value">'tuple' object has no attribute 'ordered'</pre>
|
---|
115 | <table class="meta">
|
---|
116 | <tr>
|
---|
117 | <th>Request Method:</th>
|
---|
118 | <td>GET</td>
|
---|
119 | </tr>
|
---|
120 | <tr>
|
---|
121 | <th>Request URL:</th>
|
---|
122 | <td>http://localhost:8081/admin/edittest/mymodel/?p=2</td>
|
---|
123 | </tr>
|
---|
124 | <tr>
|
---|
125 | <th>Django Version:</th>
|
---|
126 | <td>1.3 pre-alpha SVN-13863</td>
|
---|
127 | </tr>
|
---|
128 | <tr>
|
---|
129 | <th>Exception Type:</th>
|
---|
130 | <td>AttributeError</td>
|
---|
131 | </tr>
|
---|
132 | <tr>
|
---|
133 | <th>Exception Value:</th>
|
---|
134 | <td><pre>'tuple' object has no attribute 'ordered'</pre></td>
|
---|
135 | </tr>
|
---|
136 | <tr>
|
---|
137 | <th>Exception Location:</th>
|
---|
138 | <td>/home/tuttle/tmp/editable-test/django-trunk/django/forms/models.py in get_queryset, line 476</td>
|
---|
139 | </tr>
|
---|
140 | <tr>
|
---|
141 | <th>Python Executable:</th>
|
---|
142 | <td>/usr/bin/python</td>
|
---|
143 | </tr>
|
---|
144 | <tr>
|
---|
145 | <th>Python Version:</th>
|
---|
146 | <td>2.6.4</td>
|
---|
147 | </tr>
|
---|
148 | <tr>
|
---|
149 | <th>Python Path:</th>
|
---|
150 | <td>['/home/tuttle/tmp/editable-test/editabletest', '/home/tuttle/tmp/editable-test/django-trunk', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/pymodules/python2.6/gtk-2.0', '/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode']</td>
|
---|
151 | </tr>
|
---|
152 | <tr>
|
---|
153 | <th>Server time:</th>
|
---|
154 | <td>Sun, 19 Sep 2010 14:27:17 -0500</td>
|
---|
155 | </tr>
|
---|
156 | </table>
|
---|
157 | </div>
|
---|
158 |
|
---|
159 |
|
---|
160 |
|
---|
161 | <div id="traceback">
|
---|
162 | <h2>Traceback <span class="commands"><a href="#" onclick="return switchPastebinFriendly(this);">Switch to copy-and-paste view</a></span></h2>
|
---|
163 |
|
---|
164 | <div id="browserTraceback">
|
---|
165 | <ul class="traceback">
|
---|
166 |
|
---|
167 | <li class="frame">
|
---|
168 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/core/handlers/base.py</code> in <code>get_response</code>
|
---|
169 |
|
---|
170 |
|
---|
171 | <div class="context" id="c3047862916">
|
---|
172 |
|
---|
173 | <ol start="93" class="pre-context" id="pre3047862916"><li onclick="toggle('pre3047862916', 'post3047862916')"> # Apply view middleware</li><li onclick="toggle('pre3047862916', 'post3047862916')"> for middleware_method in self._view_middleware:</li><li onclick="toggle('pre3047862916', 'post3047862916')"> response = middleware_method(request, callback, callback_args, callback_kwargs)</li><li onclick="toggle('pre3047862916', 'post3047862916')"> if response:</li><li onclick="toggle('pre3047862916', 'post3047862916')"> return response</li><li onclick="toggle('pre3047862916', 'post3047862916')"></li><li onclick="toggle('pre3047862916', 'post3047862916')"> try:</li></ol>
|
---|
174 |
|
---|
175 | <ol start="100" class="context-line"><li onclick="toggle('pre3047862916', 'post3047862916')"> response = callback(request, *callback_args, **callback_kwargs) <span>...</span></li></ol>
|
---|
176 |
|
---|
177 | <ol start='101' class="post-context" id="post3047862916"><li onclick="toggle('pre3047862916', 'post3047862916')"> except Exception, e:</li><li onclick="toggle('pre3047862916', 'post3047862916')"> # If the view raised an exception, run it through exception</li><li onclick="toggle('pre3047862916', 'post3047862916')"> # middleware, and if the exception middleware returns a</li><li onclick="toggle('pre3047862916', 'post3047862916')"> # response, use that. Otherwise, reraise the exception.</li><li onclick="toggle('pre3047862916', 'post3047862916')"> for middleware_method in self._exception_middleware:</li><li onclick="toggle('pre3047862916', 'post3047862916')"> response = middleware_method(request, e)</li></ol>
|
---|
178 |
|
---|
179 | </div>
|
---|
180 |
|
---|
181 |
|
---|
182 |
|
---|
183 | <div class="commands">
|
---|
184 | <a href="#" onclick="return varToggle(this, '3047862916')"><span>▶</span> Local vars</a>
|
---|
185 | </div>
|
---|
186 | <table class="vars" id="v3047862916">
|
---|
187 | <thead>
|
---|
188 | <tr>
|
---|
189 | <th>Variable</th>
|
---|
190 | <th>Value</th>
|
---|
191 | </tr>
|
---|
192 | </thead>
|
---|
193 | <tbody>
|
---|
194 |
|
---|
195 | <tr>
|
---|
196 | <td>callback</td>
|
---|
197 | <td class="code"><div><function changelist_view at 0x9846064></div></td>
|
---|
198 | </tr>
|
---|
199 |
|
---|
200 | <tr>
|
---|
201 | <td>callback_args</td>
|
---|
202 | <td class="code"><div>()</div></td>
|
---|
203 | </tr>
|
---|
204 |
|
---|
205 | <tr>
|
---|
206 | <td>callback_kwargs</td>
|
---|
207 | <td class="code"><div>{}</div></td>
|
---|
208 | </tr>
|
---|
209 |
|
---|
210 | <tr>
|
---|
211 | <td>e</td>
|
---|
212 | <td class="code"><div>AttributeError("'tuple' object has no attribute 'ordered'",)</div></td>
|
---|
213 | </tr>
|
---|
214 |
|
---|
215 | <tr>
|
---|
216 | <td>exceptions</td>
|
---|
217 | <td class="code"><div><module 'django.core.exceptions' from '/home/tuttle/tmp/editable-test/django-trunk/django/core/exceptions.pyc'></div></td>
|
---|
218 | </tr>
|
---|
219 |
|
---|
220 | <tr>
|
---|
221 | <td>middleware_method</td>
|
---|
222 | <td class="code"><div><bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x97d2f6c>></div></td>
|
---|
223 | </tr>
|
---|
224 |
|
---|
225 | <tr>
|
---|
226 | <td>receivers</td>
|
---|
227 | <td class="code"><div>[(<function _rollback_on_exception at 0x94317d4>, None)]</div></td>
|
---|
228 | </tr>
|
---|
229 |
|
---|
230 | <tr>
|
---|
231 | <td>request</td>
|
---|
232 | <td class="code"><div><WSGIRequest
|
---|
233 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
234 | POST:<QueryDict: {}>,
|
---|
235 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
236 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
237 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
238 | 'django_language': 'cs',
|
---|
239 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
240 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
241 | 'CONTENT_LENGTH': '',
|
---|
242 | 'CONTENT_TYPE': 'text/plain',
|
---|
243 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
244 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
245 | 'DISPLAY': ':0.0',
|
---|
246 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
247 | 'EDITOR': 'joe',
|
---|
248 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
249 | 'FIGNORE': '.o:~',
|
---|
250 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
251 | 'GREP_COLOR': '1;34',
|
---|
252 | 'GREP_OPTIONS': '--color=auto',
|
---|
253 | 'HISTCONTROL': 'ignoreboth',
|
---|
254 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
255 | 'HISTSIZE': '5000',
|
---|
256 | 'HOME': '/home/tuttle',
|
---|
257 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
258 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
259 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
260 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
261 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
262 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
263 | 'HTTP_HOST': 'localhost:8081',
|
---|
264 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
265 | 'HTTP_KEEP_ALIVE': '115',
|
---|
266 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
267 | 'LANG': 'en_US.UTF-8',
|
---|
268 | 'LESS': '-isMRnq#3~',
|
---|
269 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
270 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
271 | 'LOGNAME': 'tuttle',
|
---|
272 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
273 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
274 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
275 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
276 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
277 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
278 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
279 | 'PROMPT_COMMAND': 'history -a',
|
---|
280 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
281 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
282 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
283 | 'QUERY_STRING': 'p=2',
|
---|
284 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
285 | 'REMOTE_HOST': '',
|
---|
286 | 'REQUEST_METHOD': 'GET',
|
---|
287 | 'RUN_MAIN': 'true',
|
---|
288 | 'SCRIPT_NAME': u'',
|
---|
289 | 'SERVER_NAME': 'localhost',
|
---|
290 | 'SERVER_PORT': '8081',
|
---|
291 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
292 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
293 | 'SHELL': '/bin/bash',
|
---|
294 | 'SHLVL': '1',
|
---|
295 | 'SSH_AGENT_PID': '4221',
|
---|
296 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
297 | 'TERM': 'xterm',
|
---|
298 | 'TZ': 'America/Chicago',
|
---|
299 | 'USER': 'tuttle',
|
---|
300 | 'VISUAL': 'joe',
|
---|
301 | 'WINDOWID': '41943055',
|
---|
302 | 'WINDOWPATH': '7',
|
---|
303 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
304 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
305 | 'XTERM_SHELL': '/bin/bash',
|
---|
306 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
307 | '_': './manage.py',
|
---|
308 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
309 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
310 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
311 | 'wsgi.multiprocess': False,
|
---|
312 | 'wsgi.multithread': True,
|
---|
313 | 'wsgi.run_once': False,
|
---|
314 | 'wsgi.url_scheme': 'http',
|
---|
315 | 'wsgi.version': (1, 0)}></div></td>
|
---|
316 | </tr>
|
---|
317 |
|
---|
318 | <tr>
|
---|
319 | <td>resolver</td>
|
---|
320 | <td class="code"><div><RegexURLResolver editabletest.urls (None:None) ^/></div></td>
|
---|
321 | </tr>
|
---|
322 |
|
---|
323 | <tr>
|
---|
324 | <td>response</td>
|
---|
325 | <td class="code"><div>None</div></td>
|
---|
326 | </tr>
|
---|
327 |
|
---|
328 | <tr>
|
---|
329 | <td>self</td>
|
---|
330 | <td class="code"><div><django.core.handlers.wsgi.WSGIHandler object at 0x971d6ac></div></td>
|
---|
331 | </tr>
|
---|
332 |
|
---|
333 | <tr>
|
---|
334 | <td>settings</td>
|
---|
335 | <td class="code"><div><django.conf.LazySettings object at 0xb726314c></div></td>
|
---|
336 | </tr>
|
---|
337 |
|
---|
338 | <tr>
|
---|
339 | <td>urlconf</td>
|
---|
340 | <td class="code"><div>'editabletest.urls'</div></td>
|
---|
341 | </tr>
|
---|
342 |
|
---|
343 | <tr>
|
---|
344 | <td>urlresolvers</td>
|
---|
345 | <td class="code"><div><module 'django.core.urlresolvers' from '/home/tuttle/tmp/editable-test/django-trunk/django/core/urlresolvers.pyc'></div></td>
|
---|
346 | </tr>
|
---|
347 |
|
---|
348 | </tbody>
|
---|
349 | </table>
|
---|
350 |
|
---|
351 | </li>
|
---|
352 |
|
---|
353 | <li class="frame">
|
---|
354 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/contrib/admin/options.py</code> in <code>wrapper</code>
|
---|
355 |
|
---|
356 |
|
---|
357 | <div class="context" id="c3047862436">
|
---|
358 |
|
---|
359 | <ol start="238" class="pre-context" id="pre3047862436"><li onclick="toggle('pre3047862436', 'post3047862436')"> super(ModelAdmin, self).__init__()</li><li onclick="toggle('pre3047862436', 'post3047862436')"></li><li onclick="toggle('pre3047862436', 'post3047862436')"> def get_urls(self):</li><li onclick="toggle('pre3047862436', 'post3047862436')"> from django.conf.urls.defaults import patterns, url</li><li onclick="toggle('pre3047862436', 'post3047862436')"></li><li onclick="toggle('pre3047862436', 'post3047862436')"> def wrap(view):</li><li onclick="toggle('pre3047862436', 'post3047862436')"> def wrapper(*args, **kwargs):</li></ol>
|
---|
360 |
|
---|
361 | <ol start="245" class="context-line"><li onclick="toggle('pre3047862436', 'post3047862436')"> return self.admin_site.admin_view(view)(*args, **kwargs) <span>...</span></li></ol>
|
---|
362 |
|
---|
363 | <ol start='246' class="post-context" id="post3047862436"><li onclick="toggle('pre3047862436', 'post3047862436')"> return update_wrapper(wrapper, view)</li><li onclick="toggle('pre3047862436', 'post3047862436')"></li><li onclick="toggle('pre3047862436', 'post3047862436')"> info = self.model._meta.app_label, self.model._meta.module_name</li><li onclick="toggle('pre3047862436', 'post3047862436')"></li><li onclick="toggle('pre3047862436', 'post3047862436')"> urlpatterns = patterns('',</li><li onclick="toggle('pre3047862436', 'post3047862436')"> url(r'^$',</li></ol>
|
---|
364 |
|
---|
365 | </div>
|
---|
366 |
|
---|
367 |
|
---|
368 |
|
---|
369 | <div class="commands">
|
---|
370 | <a href="#" onclick="return varToggle(this, '3047862436')"><span>▶</span> Local vars</a>
|
---|
371 | </div>
|
---|
372 | <table class="vars" id="v3047862436">
|
---|
373 | <thead>
|
---|
374 | <tr>
|
---|
375 | <th>Variable</th>
|
---|
376 | <th>Value</th>
|
---|
377 | </tr>
|
---|
378 | </thead>
|
---|
379 | <tbody>
|
---|
380 |
|
---|
381 | <tr>
|
---|
382 | <td>args</td>
|
---|
383 | <td class="code"><div>(<WSGIRequest
|
---|
384 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
385 | POST:<QueryDict: {}>,
|
---|
386 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
387 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
388 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
389 | 'django_language': 'cs',
|
---|
390 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
391 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
392 | 'CONTENT_LENGTH': '',
|
---|
393 | 'CONTENT_TYPE': 'text/plain',
|
---|
394 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
395 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
396 | 'DISPLAY': ':0.0',
|
---|
397 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
398 | 'EDITOR': 'joe',
|
---|
399 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
400 | 'FIGNORE': '.o:~',
|
---|
401 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
402 | 'GREP_COLOR': '1;34',
|
---|
403 | 'GREP_OPTIONS': '--color=auto',
|
---|
404 | 'HISTCONTROL': 'ignoreboth',
|
---|
405 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
406 | 'HISTSIZE': '5000',
|
---|
407 | 'HOME': '/home/tuttle',
|
---|
408 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
409 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
410 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
411 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
412 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
413 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
414 | 'HTTP_HOST': 'localhost:8081',
|
---|
415 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
416 | 'HTTP_KEEP_ALIVE': '115',
|
---|
417 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
418 | 'LANG': 'en_US.UTF-8',
|
---|
419 | 'LESS': '-isMRnq#3~',
|
---|
420 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
421 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
422 | 'LOGNAME': 'tuttle',
|
---|
423 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
424 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
425 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
426 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
427 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
428 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
429 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
430 | 'PROMPT_COMMAND': 'history -a',
|
---|
431 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
432 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
433 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
434 | 'QUERY_STRING': 'p=2',
|
---|
435 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
436 | 'REMOTE_HOST': '',
|
---|
437 | 'REQUEST_METHOD': 'GET',
|
---|
438 | 'RUN_MAIN': 'true',
|
---|
439 | 'SCRIPT_NAME': u'',
|
---|
440 | 'SERVER_NAME': 'localhost',
|
---|
441 | 'SERVER_PORT': '8081',
|
---|
442 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
443 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
444 | 'SHELL': '/bin/bash',
|
---|
445 | 'SHLVL': '1',
|
---|
446 | 'SSH_AGENT_PID': '4221',
|
---|
447 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
448 | 'TERM': 'xterm',
|
---|
449 | 'TZ': 'America/Chicago',
|
---|
450 | 'USER': 'tuttle',
|
---|
451 | 'VISUAL': 'joe',
|
---|
452 | 'WINDOWID': '41943055',
|
---|
453 | 'WINDOWPATH': '7',
|
---|
454 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
455 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
456 | 'XTERM_SHELL': '/bin/bash',
|
---|
457 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
458 | '_': './manage.py',
|
---|
459 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
460 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
461 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
462 | 'wsgi.multiprocess': False,
|
---|
463 | 'wsgi.multithread': True,
|
---|
464 | 'wsgi.run_once': False,
|
---|
465 | 'wsgi.url_scheme': 'http',
|
---|
466 | 'wsgi.version': (1, 0)}>,)</div></td>
|
---|
467 | </tr>
|
---|
468 |
|
---|
469 | <tr>
|
---|
470 | <td>kwargs</td>
|
---|
471 | <td class="code"><div>{}</div></td>
|
---|
472 | </tr>
|
---|
473 |
|
---|
474 | <tr>
|
---|
475 | <td>self</td>
|
---|
476 | <td class="code"><div><editabletest.edittest.admin.MyModelAdmin object at 0x983dbac></div></td>
|
---|
477 | </tr>
|
---|
478 |
|
---|
479 | <tr>
|
---|
480 | <td>view</td>
|
---|
481 | <td class="code"><div><bound method MyModelAdmin.changelist_view of <editabletest.edittest.admin.MyModelAdmin object at 0x983dbac>></div></td>
|
---|
482 | </tr>
|
---|
483 |
|
---|
484 | </tbody>
|
---|
485 | </table>
|
---|
486 |
|
---|
487 | </li>
|
---|
488 |
|
---|
489 | <li class="frame">
|
---|
490 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py</code> in <code>_wrapped_view</code>
|
---|
491 |
|
---|
492 |
|
---|
493 | <div class="context" id="c3047865036">
|
---|
494 |
|
---|
495 | <ol start="69" class="pre-context" id="pre3047865036"><li onclick="toggle('pre3047865036', 'post3047865036')"> if result is not None:</li><li onclick="toggle('pre3047865036', 'post3047865036')"> return result</li><li onclick="toggle('pre3047865036', 'post3047865036')"> if hasattr(middleware, 'process_view'):</li><li onclick="toggle('pre3047865036', 'post3047865036')"> result = middleware.process_view(request, view_func, args, kwargs)</li><li onclick="toggle('pre3047865036', 'post3047865036')"> if result is not None:</li><li onclick="toggle('pre3047865036', 'post3047865036')"> return result</li><li onclick="toggle('pre3047865036', 'post3047865036')"> try:</li></ol>
|
---|
496 |
|
---|
497 | <ol start="76" class="context-line"><li onclick="toggle('pre3047865036', 'post3047865036')"> response = view_func(request, *args, **kwargs) <span>...</span></li></ol>
|
---|
498 |
|
---|
499 | <ol start='77' class="post-context" id="post3047865036"><li onclick="toggle('pre3047865036', 'post3047865036')"> except Exception, e:</li><li onclick="toggle('pre3047865036', 'post3047865036')"> if hasattr(middleware, 'process_exception'):</li><li onclick="toggle('pre3047865036', 'post3047865036')"> result = middleware.process_exception(request, e)</li><li onclick="toggle('pre3047865036', 'post3047865036')"> if result is not None:</li><li onclick="toggle('pre3047865036', 'post3047865036')"> return result</li><li onclick="toggle('pre3047865036', 'post3047865036')"> raise</li></ol>
|
---|
500 |
|
---|
501 | </div>
|
---|
502 |
|
---|
503 |
|
---|
504 |
|
---|
505 | <div class="commands">
|
---|
506 | <a href="#" onclick="return varToggle(this, '3047865036')"><span>▶</span> Local vars</a>
|
---|
507 | </div>
|
---|
508 | <table class="vars" id="v3047865036">
|
---|
509 | <thead>
|
---|
510 | <tr>
|
---|
511 | <th>Variable</th>
|
---|
512 | <th>Value</th>
|
---|
513 | </tr>
|
---|
514 | </thead>
|
---|
515 | <tbody>
|
---|
516 |
|
---|
517 | <tr>
|
---|
518 | <td>args</td>
|
---|
519 | <td class="code"><div>()</div></td>
|
---|
520 | </tr>
|
---|
521 |
|
---|
522 | <tr>
|
---|
523 | <td>e</td>
|
---|
524 | <td class="code"><div>AttributeError("'tuple' object has no attribute 'ordered'",)</div></td>
|
---|
525 | </tr>
|
---|
526 |
|
---|
527 | <tr>
|
---|
528 | <td>kwargs</td>
|
---|
529 | <td class="code"><div>{}</div></td>
|
---|
530 | </tr>
|
---|
531 |
|
---|
532 | <tr>
|
---|
533 | <td>middleware</td>
|
---|
534 | <td class="code"><div><django.middleware.csrf.CsrfViewMiddleware object at 0x96ceb6c></div></td>
|
---|
535 | </tr>
|
---|
536 |
|
---|
537 | <tr>
|
---|
538 | <td>request</td>
|
---|
539 | <td class="code"><div><WSGIRequest
|
---|
540 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
541 | POST:<QueryDict: {}>,
|
---|
542 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
543 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
544 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
545 | 'django_language': 'cs',
|
---|
546 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
547 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
548 | 'CONTENT_LENGTH': '',
|
---|
549 | 'CONTENT_TYPE': 'text/plain',
|
---|
550 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
551 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
552 | 'DISPLAY': ':0.0',
|
---|
553 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
554 | 'EDITOR': 'joe',
|
---|
555 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
556 | 'FIGNORE': '.o:~',
|
---|
557 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
558 | 'GREP_COLOR': '1;34',
|
---|
559 | 'GREP_OPTIONS': '--color=auto',
|
---|
560 | 'HISTCONTROL': 'ignoreboth',
|
---|
561 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
562 | 'HISTSIZE': '5000',
|
---|
563 | 'HOME': '/home/tuttle',
|
---|
564 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
565 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
566 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
567 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
568 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
569 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
570 | 'HTTP_HOST': 'localhost:8081',
|
---|
571 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
572 | 'HTTP_KEEP_ALIVE': '115',
|
---|
573 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
574 | 'LANG': 'en_US.UTF-8',
|
---|
575 | 'LESS': '-isMRnq#3~',
|
---|
576 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
577 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
578 | 'LOGNAME': 'tuttle',
|
---|
579 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
580 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
581 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
582 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
583 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
584 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
585 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
586 | 'PROMPT_COMMAND': 'history -a',
|
---|
587 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
588 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
589 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
590 | 'QUERY_STRING': 'p=2',
|
---|
591 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
592 | 'REMOTE_HOST': '',
|
---|
593 | 'REQUEST_METHOD': 'GET',
|
---|
594 | 'RUN_MAIN': 'true',
|
---|
595 | 'SCRIPT_NAME': u'',
|
---|
596 | 'SERVER_NAME': 'localhost',
|
---|
597 | 'SERVER_PORT': '8081',
|
---|
598 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
599 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
600 | 'SHELL': '/bin/bash',
|
---|
601 | 'SHLVL': '1',
|
---|
602 | 'SSH_AGENT_PID': '4221',
|
---|
603 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
604 | 'TERM': 'xterm',
|
---|
605 | 'TZ': 'America/Chicago',
|
---|
606 | 'USER': 'tuttle',
|
---|
607 | 'VISUAL': 'joe',
|
---|
608 | 'WINDOWID': '41943055',
|
---|
609 | 'WINDOWPATH': '7',
|
---|
610 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
611 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
612 | 'XTERM_SHELL': '/bin/bash',
|
---|
613 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
614 | '_': './manage.py',
|
---|
615 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
616 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
617 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
618 | 'wsgi.multiprocess': False,
|
---|
619 | 'wsgi.multithread': True,
|
---|
620 | 'wsgi.run_once': False,
|
---|
621 | 'wsgi.url_scheme': 'http',
|
---|
622 | 'wsgi.version': (1, 0)}></div></td>
|
---|
623 | </tr>
|
---|
624 |
|
---|
625 | <tr>
|
---|
626 | <td>result</td>
|
---|
627 | <td class="code"><div>None</div></td>
|
---|
628 | </tr>
|
---|
629 |
|
---|
630 | <tr>
|
---|
631 | <td>view_func</td>
|
---|
632 | <td class="code"><div><function inner at 0x98d0a3c></div></td>
|
---|
633 | </tr>
|
---|
634 |
|
---|
635 | </tbody>
|
---|
636 | </table>
|
---|
637 |
|
---|
638 | </li>
|
---|
639 |
|
---|
640 | <li class="frame">
|
---|
641 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/views/decorators/cache.py</code> in <code>_wrapped_view_func</code>
|
---|
642 |
|
---|
643 |
|
---|
644 | <div class="context" id="c3047864956">
|
---|
645 |
|
---|
646 | <ol start="62" class="pre-context" id="pre3047864956"><li onclick="toggle('pre3047864956', 'post3047864956')"></li><li onclick="toggle('pre3047864956', 'post3047864956')">def never_cache(view_func):</li><li onclick="toggle('pre3047864956', 'post3047864956')"> """</li><li onclick="toggle('pre3047864956', 'post3047864956')"> Decorator that adds headers to a response so that it will</li><li onclick="toggle('pre3047864956', 'post3047864956')"> never be cached.</li><li onclick="toggle('pre3047864956', 'post3047864956')"> """</li><li onclick="toggle('pre3047864956', 'post3047864956')"> def _wrapped_view_func(request, *args, **kwargs):</li></ol>
|
---|
647 |
|
---|
648 | <ol start="69" class="context-line"><li onclick="toggle('pre3047864956', 'post3047864956')"> response = view_func(request, *args, **kwargs) <span>...</span></li></ol>
|
---|
649 |
|
---|
650 | <ol start='70' class="post-context" id="post3047864956"><li onclick="toggle('pre3047864956', 'post3047864956')"> add_never_cache_headers(response)</li><li onclick="toggle('pre3047864956', 'post3047864956')"> return response</li><li onclick="toggle('pre3047864956', 'post3047864956')"> return wraps(view_func, assigned=available_attrs(view_func))(_wrapped_view_func)</li></ol>
|
---|
651 |
|
---|
652 | </div>
|
---|
653 |
|
---|
654 |
|
---|
655 |
|
---|
656 | <div class="commands">
|
---|
657 | <a href="#" onclick="return varToggle(this, '3047864956')"><span>▶</span> Local vars</a>
|
---|
658 | </div>
|
---|
659 | <table class="vars" id="v3047864956">
|
---|
660 | <thead>
|
---|
661 | <tr>
|
---|
662 | <th>Variable</th>
|
---|
663 | <th>Value</th>
|
---|
664 | </tr>
|
---|
665 | </thead>
|
---|
666 | <tbody>
|
---|
667 |
|
---|
668 | <tr>
|
---|
669 | <td>args</td>
|
---|
670 | <td class="code"><div>()</div></td>
|
---|
671 | </tr>
|
---|
672 |
|
---|
673 | <tr>
|
---|
674 | <td>kwargs</td>
|
---|
675 | <td class="code"><div>{}</div></td>
|
---|
676 | </tr>
|
---|
677 |
|
---|
678 | <tr>
|
---|
679 | <td>request</td>
|
---|
680 | <td class="code"><div><WSGIRequest
|
---|
681 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
682 | POST:<QueryDict: {}>,
|
---|
683 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
684 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
685 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
686 | 'django_language': 'cs',
|
---|
687 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
688 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
689 | 'CONTENT_LENGTH': '',
|
---|
690 | 'CONTENT_TYPE': 'text/plain',
|
---|
691 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
692 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
693 | 'DISPLAY': ':0.0',
|
---|
694 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
695 | 'EDITOR': 'joe',
|
---|
696 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
697 | 'FIGNORE': '.o:~',
|
---|
698 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
699 | 'GREP_COLOR': '1;34',
|
---|
700 | 'GREP_OPTIONS': '--color=auto',
|
---|
701 | 'HISTCONTROL': 'ignoreboth',
|
---|
702 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
703 | 'HISTSIZE': '5000',
|
---|
704 | 'HOME': '/home/tuttle',
|
---|
705 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
706 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
707 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
708 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
709 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
710 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
711 | 'HTTP_HOST': 'localhost:8081',
|
---|
712 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
713 | 'HTTP_KEEP_ALIVE': '115',
|
---|
714 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
715 | 'LANG': 'en_US.UTF-8',
|
---|
716 | 'LESS': '-isMRnq#3~',
|
---|
717 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
718 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
719 | 'LOGNAME': 'tuttle',
|
---|
720 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
721 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
722 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
723 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
724 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
725 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
726 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
727 | 'PROMPT_COMMAND': 'history -a',
|
---|
728 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
729 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
730 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
731 | 'QUERY_STRING': 'p=2',
|
---|
732 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
733 | 'REMOTE_HOST': '',
|
---|
734 | 'REQUEST_METHOD': 'GET',
|
---|
735 | 'RUN_MAIN': 'true',
|
---|
736 | 'SCRIPT_NAME': u'',
|
---|
737 | 'SERVER_NAME': 'localhost',
|
---|
738 | 'SERVER_PORT': '8081',
|
---|
739 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
740 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
741 | 'SHELL': '/bin/bash',
|
---|
742 | 'SHLVL': '1',
|
---|
743 | 'SSH_AGENT_PID': '4221',
|
---|
744 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
745 | 'TERM': 'xterm',
|
---|
746 | 'TZ': 'America/Chicago',
|
---|
747 | 'USER': 'tuttle',
|
---|
748 | 'VISUAL': 'joe',
|
---|
749 | 'WINDOWID': '41943055',
|
---|
750 | 'WINDOWPATH': '7',
|
---|
751 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
752 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
753 | 'XTERM_SHELL': '/bin/bash',
|
---|
754 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
755 | '_': './manage.py',
|
---|
756 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
757 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
758 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
759 | 'wsgi.multiprocess': False,
|
---|
760 | 'wsgi.multithread': True,
|
---|
761 | 'wsgi.run_once': False,
|
---|
762 | 'wsgi.url_scheme': 'http',
|
---|
763 | 'wsgi.version': (1, 0)}></div></td>
|
---|
764 | </tr>
|
---|
765 |
|
---|
766 | <tr>
|
---|
767 | <td>view_func</td>
|
---|
768 | <td class="code"><div><function inner at 0x98d0764></div></td>
|
---|
769 | </tr>
|
---|
770 |
|
---|
771 | </tbody>
|
---|
772 | </table>
|
---|
773 |
|
---|
774 | </li>
|
---|
775 |
|
---|
776 | <li class="frame">
|
---|
777 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/contrib/admin/sites.py</code> in <code>inner</code>
|
---|
778 |
|
---|
779 |
|
---|
780 | <div class="context" id="c3047864636">
|
---|
781 |
|
---|
782 | <ol start="183" class="pre-context" id="pre3047864636"><li onclick="toggle('pre3047864636', 'post3047864636')"> By default, admin_views are marked non-cacheable using the</li><li onclick="toggle('pre3047864636', 'post3047864636')"> ``never_cache`` decorator. If the view can be safely cached, set</li><li onclick="toggle('pre3047864636', 'post3047864636')"> cacheable=True.</li><li onclick="toggle('pre3047864636', 'post3047864636')"> """</li><li onclick="toggle('pre3047864636', 'post3047864636')"> def inner(request, *args, **kwargs):</li><li onclick="toggle('pre3047864636', 'post3047864636')"> if not self.has_permission(request):</li><li onclick="toggle('pre3047864636', 'post3047864636')"> return self.login(request)</li></ol>
|
---|
783 |
|
---|
784 | <ol start="190" class="context-line"><li onclick="toggle('pre3047864636', 'post3047864636')"> return view(request, *args, **kwargs) <span>...</span></li></ol>
|
---|
785 |
|
---|
786 | <ol start='191' class="post-context" id="post3047864636"><li onclick="toggle('pre3047864636', 'post3047864636')"> if not cacheable:</li><li onclick="toggle('pre3047864636', 'post3047864636')"> inner = never_cache(inner)</li><li onclick="toggle('pre3047864636', 'post3047864636')"> # We add csrf_protect here so this function can be used as a utility</li><li onclick="toggle('pre3047864636', 'post3047864636')"> # function for any view, without having to repeat 'csrf_protect'.</li><li onclick="toggle('pre3047864636', 'post3047864636')"> if not getattr(view, 'csrf_exempt', False):</li><li onclick="toggle('pre3047864636', 'post3047864636')"> inner = csrf_protect(inner)</li></ol>
|
---|
787 |
|
---|
788 | </div>
|
---|
789 |
|
---|
790 |
|
---|
791 |
|
---|
792 | <div class="commands">
|
---|
793 | <a href="#" onclick="return varToggle(this, '3047864636')"><span>▶</span> Local vars</a>
|
---|
794 | </div>
|
---|
795 | <table class="vars" id="v3047864636">
|
---|
796 | <thead>
|
---|
797 | <tr>
|
---|
798 | <th>Variable</th>
|
---|
799 | <th>Value</th>
|
---|
800 | </tr>
|
---|
801 | </thead>
|
---|
802 | <tbody>
|
---|
803 |
|
---|
804 | <tr>
|
---|
805 | <td>args</td>
|
---|
806 | <td class="code"><div>()</div></td>
|
---|
807 | </tr>
|
---|
808 |
|
---|
809 | <tr>
|
---|
810 | <td>kwargs</td>
|
---|
811 | <td class="code"><div>{}</div></td>
|
---|
812 | </tr>
|
---|
813 |
|
---|
814 | <tr>
|
---|
815 | <td>request</td>
|
---|
816 | <td class="code"><div><WSGIRequest
|
---|
817 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
818 | POST:<QueryDict: {}>,
|
---|
819 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
820 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
821 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
822 | 'django_language': 'cs',
|
---|
823 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
824 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
825 | 'CONTENT_LENGTH': '',
|
---|
826 | 'CONTENT_TYPE': 'text/plain',
|
---|
827 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
828 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
829 | 'DISPLAY': ':0.0',
|
---|
830 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
831 | 'EDITOR': 'joe',
|
---|
832 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
833 | 'FIGNORE': '.o:~',
|
---|
834 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
835 | 'GREP_COLOR': '1;34',
|
---|
836 | 'GREP_OPTIONS': '--color=auto',
|
---|
837 | 'HISTCONTROL': 'ignoreboth',
|
---|
838 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
839 | 'HISTSIZE': '5000',
|
---|
840 | 'HOME': '/home/tuttle',
|
---|
841 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
842 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
843 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
844 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
845 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
846 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
847 | 'HTTP_HOST': 'localhost:8081',
|
---|
848 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
849 | 'HTTP_KEEP_ALIVE': '115',
|
---|
850 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
851 | 'LANG': 'en_US.UTF-8',
|
---|
852 | 'LESS': '-isMRnq#3~',
|
---|
853 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
854 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
855 | 'LOGNAME': 'tuttle',
|
---|
856 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
857 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
858 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
859 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
860 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
861 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
862 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
863 | 'PROMPT_COMMAND': 'history -a',
|
---|
864 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
865 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
866 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
867 | 'QUERY_STRING': 'p=2',
|
---|
868 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
869 | 'REMOTE_HOST': '',
|
---|
870 | 'REQUEST_METHOD': 'GET',
|
---|
871 | 'RUN_MAIN': 'true',
|
---|
872 | 'SCRIPT_NAME': u'',
|
---|
873 | 'SERVER_NAME': 'localhost',
|
---|
874 | 'SERVER_PORT': '8081',
|
---|
875 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
876 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
877 | 'SHELL': '/bin/bash',
|
---|
878 | 'SHLVL': '1',
|
---|
879 | 'SSH_AGENT_PID': '4221',
|
---|
880 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
881 | 'TERM': 'xterm',
|
---|
882 | 'TZ': 'America/Chicago',
|
---|
883 | 'USER': 'tuttle',
|
---|
884 | 'VISUAL': 'joe',
|
---|
885 | 'WINDOWID': '41943055',
|
---|
886 | 'WINDOWPATH': '7',
|
---|
887 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
888 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
889 | 'XTERM_SHELL': '/bin/bash',
|
---|
890 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
891 | '_': './manage.py',
|
---|
892 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
893 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
894 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
895 | 'wsgi.multiprocess': False,
|
---|
896 | 'wsgi.multithread': True,
|
---|
897 | 'wsgi.run_once': False,
|
---|
898 | 'wsgi.url_scheme': 'http',
|
---|
899 | 'wsgi.version': (1, 0)}></div></td>
|
---|
900 | </tr>
|
---|
901 |
|
---|
902 | <tr>
|
---|
903 | <td>self</td>
|
---|
904 | <td class="code"><div><django.contrib.admin.sites.AdminSite object at 0x96fca4c></div></td>
|
---|
905 | </tr>
|
---|
906 |
|
---|
907 | <tr>
|
---|
908 | <td>view</td>
|
---|
909 | <td class="code"><div><bound method MyModelAdmin.changelist_view of <editabletest.edittest.admin.MyModelAdmin object at 0x983dbac>></div></td>
|
---|
910 | </tr>
|
---|
911 |
|
---|
912 | </tbody>
|
---|
913 | </table>
|
---|
914 |
|
---|
915 | </li>
|
---|
916 |
|
---|
917 | <li class="frame">
|
---|
918 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py</code> in <code>_wrapper</code>
|
---|
919 |
|
---|
920 |
|
---|
921 | <div class="context" id="c3047864476">
|
---|
922 |
|
---|
923 | <ol start="14" class="pre-context" id="pre3047864476"><li onclick="toggle('pre3047864476', 'post3047864476')"> def _dec(func):</li><li onclick="toggle('pre3047864476', 'post3047864476')"> def _wrapper(self, *args, **kwargs):</li><li onclick="toggle('pre3047864476', 'post3047864476')"> def bound_func(*args2, **kwargs2):</li><li onclick="toggle('pre3047864476', 'post3047864476')"> return func(self, *args2, **kwargs2)</li><li onclick="toggle('pre3047864476', 'post3047864476')"> # bound_func has the signature that 'decorator' expects i.e. no</li><li onclick="toggle('pre3047864476', 'post3047864476')"> # 'self' argument, but it is a closure over self so it can call</li><li onclick="toggle('pre3047864476', 'post3047864476')"> # 'func' correctly.</li></ol>
|
---|
924 |
|
---|
925 | <ol start="21" class="context-line"><li onclick="toggle('pre3047864476', 'post3047864476')"> return decorator(bound_func)(*args, **kwargs) <span>...</span></li></ol>
|
---|
926 |
|
---|
927 | <ol start='22' class="post-context" id="post3047864476"><li onclick="toggle('pre3047864476', 'post3047864476')"> return wraps(func)(_wrapper)</li><li onclick="toggle('pre3047864476', 'post3047864476')"> update_wrapper(_dec, decorator)</li><li onclick="toggle('pre3047864476', 'post3047864476')"> # Change the name to aid debugging.</li><li onclick="toggle('pre3047864476', 'post3047864476')"> _dec.__name__ = 'method_decorator(%s)' % decorator.__name__</li><li onclick="toggle('pre3047864476', 'post3047864476')"> return _dec</li><li onclick="toggle('pre3047864476', 'post3047864476')"></li></ol>
|
---|
928 |
|
---|
929 | </div>
|
---|
930 |
|
---|
931 |
|
---|
932 |
|
---|
933 | <div class="commands">
|
---|
934 | <a href="#" onclick="return varToggle(this, '3047864476')"><span>▶</span> Local vars</a>
|
---|
935 | </div>
|
---|
936 | <table class="vars" id="v3047864476">
|
---|
937 | <thead>
|
---|
938 | <tr>
|
---|
939 | <th>Variable</th>
|
---|
940 | <th>Value</th>
|
---|
941 | </tr>
|
---|
942 | </thead>
|
---|
943 | <tbody>
|
---|
944 |
|
---|
945 | <tr>
|
---|
946 | <td>args</td>
|
---|
947 | <td class="code"><div>(<WSGIRequest
|
---|
948 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
949 | POST:<QueryDict: {}>,
|
---|
950 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
951 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
952 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
953 | 'django_language': 'cs',
|
---|
954 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
955 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
956 | 'CONTENT_LENGTH': '',
|
---|
957 | 'CONTENT_TYPE': 'text/plain',
|
---|
958 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
959 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
960 | 'DISPLAY': ':0.0',
|
---|
961 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
962 | 'EDITOR': 'joe',
|
---|
963 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
964 | 'FIGNORE': '.o:~',
|
---|
965 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
966 | 'GREP_COLOR': '1;34',
|
---|
967 | 'GREP_OPTIONS': '--color=auto',
|
---|
968 | 'HISTCONTROL': 'ignoreboth',
|
---|
969 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
970 | 'HISTSIZE': '5000',
|
---|
971 | 'HOME': '/home/tuttle',
|
---|
972 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
973 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
974 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
975 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
976 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
977 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
978 | 'HTTP_HOST': 'localhost:8081',
|
---|
979 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
980 | 'HTTP_KEEP_ALIVE': '115',
|
---|
981 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
982 | 'LANG': 'en_US.UTF-8',
|
---|
983 | 'LESS': '-isMRnq#3~',
|
---|
984 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
985 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
986 | 'LOGNAME': 'tuttle',
|
---|
987 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
988 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
989 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
990 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
991 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
992 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
993 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
994 | 'PROMPT_COMMAND': 'history -a',
|
---|
995 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
996 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
997 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
998 | 'QUERY_STRING': 'p=2',
|
---|
999 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
1000 | 'REMOTE_HOST': '',
|
---|
1001 | 'REQUEST_METHOD': 'GET',
|
---|
1002 | 'RUN_MAIN': 'true',
|
---|
1003 | 'SCRIPT_NAME': u'',
|
---|
1004 | 'SERVER_NAME': 'localhost',
|
---|
1005 | 'SERVER_PORT': '8081',
|
---|
1006 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
1007 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
1008 | 'SHELL': '/bin/bash',
|
---|
1009 | 'SHLVL': '1',
|
---|
1010 | 'SSH_AGENT_PID': '4221',
|
---|
1011 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
1012 | 'TERM': 'xterm',
|
---|
1013 | 'TZ': 'America/Chicago',
|
---|
1014 | 'USER': 'tuttle',
|
---|
1015 | 'VISUAL': 'joe',
|
---|
1016 | 'WINDOWID': '41943055',
|
---|
1017 | 'WINDOWPATH': '7',
|
---|
1018 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
1019 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
1020 | 'XTERM_SHELL': '/bin/bash',
|
---|
1021 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
1022 | '_': './manage.py',
|
---|
1023 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
1024 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
1025 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
1026 | 'wsgi.multiprocess': False,
|
---|
1027 | 'wsgi.multithread': True,
|
---|
1028 | 'wsgi.run_once': False,
|
---|
1029 | 'wsgi.url_scheme': 'http',
|
---|
1030 | 'wsgi.version': (1, 0)}>,)</div></td>
|
---|
1031 | </tr>
|
---|
1032 |
|
---|
1033 | <tr>
|
---|
1034 | <td>bound_func</td>
|
---|
1035 | <td class="code"><div><function bound_func at 0x98d0684></div></td>
|
---|
1036 | </tr>
|
---|
1037 |
|
---|
1038 | <tr>
|
---|
1039 | <td>decorator</td>
|
---|
1040 | <td class="code"><div><function csrf_protect at 0x96d0224></div></td>
|
---|
1041 | </tr>
|
---|
1042 |
|
---|
1043 | <tr>
|
---|
1044 | <td>func</td>
|
---|
1045 | <td class="code"><div><function changelist_view at 0x96f7cdc></div></td>
|
---|
1046 | </tr>
|
---|
1047 |
|
---|
1048 | <tr>
|
---|
1049 | <td>kwargs</td>
|
---|
1050 | <td class="code"><div>{}</div></td>
|
---|
1051 | </tr>
|
---|
1052 |
|
---|
1053 | <tr>
|
---|
1054 | <td>self</td>
|
---|
1055 | <td class="code"><div><editabletest.edittest.admin.MyModelAdmin object at 0x983dbac></div></td>
|
---|
1056 | </tr>
|
---|
1057 |
|
---|
1058 | </tbody>
|
---|
1059 | </table>
|
---|
1060 |
|
---|
1061 | </li>
|
---|
1062 |
|
---|
1063 | <li class="frame">
|
---|
1064 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py</code> in <code>_wrapped_view</code>
|
---|
1065 |
|
---|
1066 |
|
---|
1067 | <div class="context" id="c3047864036">
|
---|
1068 |
|
---|
1069 | <ol start="69" class="pre-context" id="pre3047864036"><li onclick="toggle('pre3047864036', 'post3047864036')"> if result is not None:</li><li onclick="toggle('pre3047864036', 'post3047864036')"> return result</li><li onclick="toggle('pre3047864036', 'post3047864036')"> if hasattr(middleware, 'process_view'):</li><li onclick="toggle('pre3047864036', 'post3047864036')"> result = middleware.process_view(request, view_func, args, kwargs)</li><li onclick="toggle('pre3047864036', 'post3047864036')"> if result is not None:</li><li onclick="toggle('pre3047864036', 'post3047864036')"> return result</li><li onclick="toggle('pre3047864036', 'post3047864036')"> try:</li></ol>
|
---|
1070 |
|
---|
1071 | <ol start="76" class="context-line"><li onclick="toggle('pre3047864036', 'post3047864036')"> response = view_func(request, *args, **kwargs) <span>...</span></li></ol>
|
---|
1072 |
|
---|
1073 | <ol start='77' class="post-context" id="post3047864036"><li onclick="toggle('pre3047864036', 'post3047864036')"> except Exception, e:</li><li onclick="toggle('pre3047864036', 'post3047864036')"> if hasattr(middleware, 'process_exception'):</li><li onclick="toggle('pre3047864036', 'post3047864036')"> result = middleware.process_exception(request, e)</li><li onclick="toggle('pre3047864036', 'post3047864036')"> if result is not None:</li><li onclick="toggle('pre3047864036', 'post3047864036')"> return result</li><li onclick="toggle('pre3047864036', 'post3047864036')"> raise</li></ol>
|
---|
1074 |
|
---|
1075 | </div>
|
---|
1076 |
|
---|
1077 |
|
---|
1078 |
|
---|
1079 | <div class="commands">
|
---|
1080 | <a href="#" onclick="return varToggle(this, '3047864036')"><span>▶</span> Local vars</a>
|
---|
1081 | </div>
|
---|
1082 | <table class="vars" id="v3047864036">
|
---|
1083 | <thead>
|
---|
1084 | <tr>
|
---|
1085 | <th>Variable</th>
|
---|
1086 | <th>Value</th>
|
---|
1087 | </tr>
|
---|
1088 | </thead>
|
---|
1089 | <tbody>
|
---|
1090 |
|
---|
1091 | <tr>
|
---|
1092 | <td>args</td>
|
---|
1093 | <td class="code"><div>()</div></td>
|
---|
1094 | </tr>
|
---|
1095 |
|
---|
1096 | <tr>
|
---|
1097 | <td>e</td>
|
---|
1098 | <td class="code"><div>AttributeError("'tuple' object has no attribute 'ordered'",)</div></td>
|
---|
1099 | </tr>
|
---|
1100 |
|
---|
1101 | <tr>
|
---|
1102 | <td>kwargs</td>
|
---|
1103 | <td class="code"><div>{}</div></td>
|
---|
1104 | </tr>
|
---|
1105 |
|
---|
1106 | <tr>
|
---|
1107 | <td>middleware</td>
|
---|
1108 | <td class="code"><div><django.middleware.csrf.CsrfViewMiddleware object at 0x96ceb6c></div></td>
|
---|
1109 | </tr>
|
---|
1110 |
|
---|
1111 | <tr>
|
---|
1112 | <td>request</td>
|
---|
1113 | <td class="code"><div><WSGIRequest
|
---|
1114 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
1115 | POST:<QueryDict: {}>,
|
---|
1116 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
1117 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
1118 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
1119 | 'django_language': 'cs',
|
---|
1120 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
1121 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
1122 | 'CONTENT_LENGTH': '',
|
---|
1123 | 'CONTENT_TYPE': 'text/plain',
|
---|
1124 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
1125 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
1126 | 'DISPLAY': ':0.0',
|
---|
1127 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
1128 | 'EDITOR': 'joe',
|
---|
1129 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
1130 | 'FIGNORE': '.o:~',
|
---|
1131 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
1132 | 'GREP_COLOR': '1;34',
|
---|
1133 | 'GREP_OPTIONS': '--color=auto',
|
---|
1134 | 'HISTCONTROL': 'ignoreboth',
|
---|
1135 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
1136 | 'HISTSIZE': '5000',
|
---|
1137 | 'HOME': '/home/tuttle',
|
---|
1138 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
1139 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
1140 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
1141 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
1142 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
1143 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
1144 | 'HTTP_HOST': 'localhost:8081',
|
---|
1145 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
1146 | 'HTTP_KEEP_ALIVE': '115',
|
---|
1147 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
1148 | 'LANG': 'en_US.UTF-8',
|
---|
1149 | 'LESS': '-isMRnq#3~',
|
---|
1150 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
1151 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
1152 | 'LOGNAME': 'tuttle',
|
---|
1153 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
1154 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
1155 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
1156 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
1157 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
1158 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
1159 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
1160 | 'PROMPT_COMMAND': 'history -a',
|
---|
1161 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
1162 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
1163 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
1164 | 'QUERY_STRING': 'p=2',
|
---|
1165 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
1166 | 'REMOTE_HOST': '',
|
---|
1167 | 'REQUEST_METHOD': 'GET',
|
---|
1168 | 'RUN_MAIN': 'true',
|
---|
1169 | 'SCRIPT_NAME': u'',
|
---|
1170 | 'SERVER_NAME': 'localhost',
|
---|
1171 | 'SERVER_PORT': '8081',
|
---|
1172 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
1173 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
1174 | 'SHELL': '/bin/bash',
|
---|
1175 | 'SHLVL': '1',
|
---|
1176 | 'SSH_AGENT_PID': '4221',
|
---|
1177 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
1178 | 'TERM': 'xterm',
|
---|
1179 | 'TZ': 'America/Chicago',
|
---|
1180 | 'USER': 'tuttle',
|
---|
1181 | 'VISUAL': 'joe',
|
---|
1182 | 'WINDOWID': '41943055',
|
---|
1183 | 'WINDOWPATH': '7',
|
---|
1184 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
1185 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
1186 | 'XTERM_SHELL': '/bin/bash',
|
---|
1187 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
1188 | '_': './manage.py',
|
---|
1189 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
1190 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
1191 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
1192 | 'wsgi.multiprocess': False,
|
---|
1193 | 'wsgi.multithread': True,
|
---|
1194 | 'wsgi.run_once': False,
|
---|
1195 | 'wsgi.url_scheme': 'http',
|
---|
1196 | 'wsgi.version': (1, 0)}></div></td>
|
---|
1197 | </tr>
|
---|
1198 |
|
---|
1199 | <tr>
|
---|
1200 | <td>result</td>
|
---|
1201 | <td class="code"><div>None</div></td>
|
---|
1202 | </tr>
|
---|
1203 |
|
---|
1204 | <tr>
|
---|
1205 | <td>view_func</td>
|
---|
1206 | <td class="code"><div><function bound_func at 0x98d0684></div></td>
|
---|
1207 | </tr>
|
---|
1208 |
|
---|
1209 | </tbody>
|
---|
1210 | </table>
|
---|
1211 |
|
---|
1212 | </li>
|
---|
1213 |
|
---|
1214 | <li class="frame">
|
---|
1215 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py</code> in <code>bound_func</code>
|
---|
1216 |
|
---|
1217 |
|
---|
1218 | <div class="context" id="c3047864996">
|
---|
1219 |
|
---|
1220 | <ol start="10" class="pre-context" id="pre3047864996"><li onclick="toggle('pre3047864996', 'post3047864996')">def method_decorator(decorator):</li><li onclick="toggle('pre3047864996', 'post3047864996')"> """</li><li onclick="toggle('pre3047864996', 'post3047864996')"> Converts a function decorator into a method decorator</li><li onclick="toggle('pre3047864996', 'post3047864996')"> """</li><li onclick="toggle('pre3047864996', 'post3047864996')"> def _dec(func):</li><li onclick="toggle('pre3047864996', 'post3047864996')"> def _wrapper(self, *args, **kwargs):</li><li onclick="toggle('pre3047864996', 'post3047864996')"> def bound_func(*args2, **kwargs2):</li></ol>
|
---|
1221 |
|
---|
1222 | <ol start="17" class="context-line"><li onclick="toggle('pre3047864996', 'post3047864996')"> return func(self, *args2, **kwargs2) <span>...</span></li></ol>
|
---|
1223 |
|
---|
1224 | <ol start='18' class="post-context" id="post3047864996"><li onclick="toggle('pre3047864996', 'post3047864996')"> # bound_func has the signature that 'decorator' expects i.e. no</li><li onclick="toggle('pre3047864996', 'post3047864996')"> # 'self' argument, but it is a closure over self so it can call</li><li onclick="toggle('pre3047864996', 'post3047864996')"> # 'func' correctly.</li><li onclick="toggle('pre3047864996', 'post3047864996')"> return decorator(bound_func)(*args, **kwargs)</li><li onclick="toggle('pre3047864996', 'post3047864996')"> return wraps(func)(_wrapper)</li><li onclick="toggle('pre3047864996', 'post3047864996')"> update_wrapper(_dec, decorator)</li></ol>
|
---|
1225 |
|
---|
1226 | </div>
|
---|
1227 |
|
---|
1228 |
|
---|
1229 |
|
---|
1230 | <div class="commands">
|
---|
1231 | <a href="#" onclick="return varToggle(this, '3047864996')"><span>▶</span> Local vars</a>
|
---|
1232 | </div>
|
---|
1233 | <table class="vars" id="v3047864996">
|
---|
1234 | <thead>
|
---|
1235 | <tr>
|
---|
1236 | <th>Variable</th>
|
---|
1237 | <th>Value</th>
|
---|
1238 | </tr>
|
---|
1239 | </thead>
|
---|
1240 | <tbody>
|
---|
1241 |
|
---|
1242 | <tr>
|
---|
1243 | <td>args2</td>
|
---|
1244 | <td class="code"><div>(<WSGIRequest
|
---|
1245 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
1246 | POST:<QueryDict: {}>,
|
---|
1247 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
1248 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
1249 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
1250 | 'django_language': 'cs',
|
---|
1251 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
1252 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
1253 | 'CONTENT_LENGTH': '',
|
---|
1254 | 'CONTENT_TYPE': 'text/plain',
|
---|
1255 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
1256 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
1257 | 'DISPLAY': ':0.0',
|
---|
1258 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
1259 | 'EDITOR': 'joe',
|
---|
1260 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
1261 | 'FIGNORE': '.o:~',
|
---|
1262 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
1263 | 'GREP_COLOR': '1;34',
|
---|
1264 | 'GREP_OPTIONS': '--color=auto',
|
---|
1265 | 'HISTCONTROL': 'ignoreboth',
|
---|
1266 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
1267 | 'HISTSIZE': '5000',
|
---|
1268 | 'HOME': '/home/tuttle',
|
---|
1269 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
1270 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
1271 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
1272 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
1273 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
1274 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
1275 | 'HTTP_HOST': 'localhost:8081',
|
---|
1276 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
1277 | 'HTTP_KEEP_ALIVE': '115',
|
---|
1278 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
1279 | 'LANG': 'en_US.UTF-8',
|
---|
1280 | 'LESS': '-isMRnq#3~',
|
---|
1281 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
1282 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
1283 | 'LOGNAME': 'tuttle',
|
---|
1284 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
1285 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
1286 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
1287 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
1288 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
1289 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
1290 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
1291 | 'PROMPT_COMMAND': 'history -a',
|
---|
1292 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
1293 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
1294 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
1295 | 'QUERY_STRING': 'p=2',
|
---|
1296 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
1297 | 'REMOTE_HOST': '',
|
---|
1298 | 'REQUEST_METHOD': 'GET',
|
---|
1299 | 'RUN_MAIN': 'true',
|
---|
1300 | 'SCRIPT_NAME': u'',
|
---|
1301 | 'SERVER_NAME': 'localhost',
|
---|
1302 | 'SERVER_PORT': '8081',
|
---|
1303 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
1304 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
1305 | 'SHELL': '/bin/bash',
|
---|
1306 | 'SHLVL': '1',
|
---|
1307 | 'SSH_AGENT_PID': '4221',
|
---|
1308 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
1309 | 'TERM': 'xterm',
|
---|
1310 | 'TZ': 'America/Chicago',
|
---|
1311 | 'USER': 'tuttle',
|
---|
1312 | 'VISUAL': 'joe',
|
---|
1313 | 'WINDOWID': '41943055',
|
---|
1314 | 'WINDOWPATH': '7',
|
---|
1315 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
1316 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
1317 | 'XTERM_SHELL': '/bin/bash',
|
---|
1318 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
1319 | '_': './manage.py',
|
---|
1320 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
1321 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
1322 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
1323 | 'wsgi.multiprocess': False,
|
---|
1324 | 'wsgi.multithread': True,
|
---|
1325 | 'wsgi.run_once': False,
|
---|
1326 | 'wsgi.url_scheme': 'http',
|
---|
1327 | 'wsgi.version': (1, 0)}>,)</div></td>
|
---|
1328 | </tr>
|
---|
1329 |
|
---|
1330 | <tr>
|
---|
1331 | <td>func</td>
|
---|
1332 | <td class="code"><div><function changelist_view at 0x96f7cdc></div></td>
|
---|
1333 | </tr>
|
---|
1334 |
|
---|
1335 | <tr>
|
---|
1336 | <td>kwargs2</td>
|
---|
1337 | <td class="code"><div>{}</div></td>
|
---|
1338 | </tr>
|
---|
1339 |
|
---|
1340 | <tr>
|
---|
1341 | <td>self</td>
|
---|
1342 | <td class="code"><div><editabletest.edittest.admin.MyModelAdmin object at 0x983dbac></div></td>
|
---|
1343 | </tr>
|
---|
1344 |
|
---|
1345 | </tbody>
|
---|
1346 | </table>
|
---|
1347 |
|
---|
1348 | </li>
|
---|
1349 |
|
---|
1350 | <li class="frame">
|
---|
1351 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/contrib/admin/options.py</code> in <code>changelist_view</code>
|
---|
1352 |
|
---|
1353 |
|
---|
1354 | <div class="context" id="c3047864236">
|
---|
1355 |
|
---|
1356 | <ol start="1050" class="pre-context" id="pre3047864236"><li onclick="toggle('pre3047864236', 'post3047864236')"> self.message_user(request, msg)</li><li onclick="toggle('pre3047864236', 'post3047864236')"></li><li onclick="toggle('pre3047864236', 'post3047864236')"> return HttpResponseRedirect(request.get_full_path())</li><li onclick="toggle('pre3047864236', 'post3047864236')"></li><li onclick="toggle('pre3047864236', 'post3047864236')"> # Handle GET -- construct a formset for display.</li><li onclick="toggle('pre3047864236', 'post3047864236')"> elif self.list_editable:</li><li onclick="toggle('pre3047864236', 'post3047864236')"> FormSet = self.get_changelist_formset(request)</li></ol>
|
---|
1357 |
|
---|
1358 | <ol start="1057" class="context-line"><li onclick="toggle('pre3047864236', 'post3047864236')"> formset = cl.formset = FormSet(queryset=cl.result_list) <span>...</span></li></ol>
|
---|
1359 |
|
---|
1360 | <ol start='1058' class="post-context" id="post3047864236"><li onclick="toggle('pre3047864236', 'post3047864236')"></li><li onclick="toggle('pre3047864236', 'post3047864236')"> # Build the list of media to be used by the formset.</li><li onclick="toggle('pre3047864236', 'post3047864236')"> if formset:</li><li onclick="toggle('pre3047864236', 'post3047864236')"> media = self.media + formset.media</li><li onclick="toggle('pre3047864236', 'post3047864236')"> else:</li><li onclick="toggle('pre3047864236', 'post3047864236')"> media = self.media</li></ol>
|
---|
1361 |
|
---|
1362 | </div>
|
---|
1363 |
|
---|
1364 |
|
---|
1365 |
|
---|
1366 | <div class="commands">
|
---|
1367 | <a href="#" onclick="return varToggle(this, '3047864236')"><span>▶</span> Local vars</a>
|
---|
1368 | </div>
|
---|
1369 | <table class="vars" id="v3047864236">
|
---|
1370 | <thead>
|
---|
1371 | <tr>
|
---|
1372 | <th>Variable</th>
|
---|
1373 | <th>Value</th>
|
---|
1374 | </tr>
|
---|
1375 | </thead>
|
---|
1376 | <tbody>
|
---|
1377 |
|
---|
1378 | <tr>
|
---|
1379 | <td>ChangeList</td>
|
---|
1380 | <td class="code"><div><class 'django.contrib.admin.views.main.ChangeList'></div></td>
|
---|
1381 | </tr>
|
---|
1382 |
|
---|
1383 | <tr>
|
---|
1384 | <td>ERROR_FLAG</td>
|
---|
1385 | <td class="code"><div>'e'</div></td>
|
---|
1386 | </tr>
|
---|
1387 |
|
---|
1388 | <tr>
|
---|
1389 | <td>FormSet</td>
|
---|
1390 | <td class="code"><div><class 'django.forms.formsets.MyModelFormFormSet'></div></td>
|
---|
1391 | </tr>
|
---|
1392 |
|
---|
1393 | <tr>
|
---|
1394 | <td>action_failed</td>
|
---|
1395 | <td class="code"><div>False</div></td>
|
---|
1396 | </tr>
|
---|
1397 |
|
---|
1398 | <tr>
|
---|
1399 | <td>actions</td>
|
---|
1400 | <td class="code"><div>{'delete_selected': (<function delete_selected at 0x96fa33c>, 'delete_selected', <django.utils.functional.__proxy__ object at 0x96fc36c>)}</div></td>
|
---|
1401 | </tr>
|
---|
1402 |
|
---|
1403 | <tr>
|
---|
1404 | <td>app_label</td>
|
---|
1405 | <td class="code"><div>'edittest'</div></td>
|
---|
1406 | </tr>
|
---|
1407 |
|
---|
1408 | <tr>
|
---|
1409 | <td>cl</td>
|
---|
1410 | <td class="code"><div><django.contrib.admin.views.main.ChangeList object at 0xb68abdec></div></td>
|
---|
1411 | </tr>
|
---|
1412 |
|
---|
1413 | <tr>
|
---|
1414 | <td>extra_context</td>
|
---|
1415 | <td class="code"><div>None</div></td>
|
---|
1416 | </tr>
|
---|
1417 |
|
---|
1418 | <tr>
|
---|
1419 | <td>formset</td>
|
---|
1420 | <td class="code"><div>None</div></td>
|
---|
1421 | </tr>
|
---|
1422 |
|
---|
1423 | <tr>
|
---|
1424 | <td>list_display</td>
|
---|
1425 | <td class="code"><div>['action_checkbox', 'id', 'boolfield', 'boolfield2']</div></td>
|
---|
1426 | </tr>
|
---|
1427 |
|
---|
1428 | <tr>
|
---|
1429 | <td>opts</td>
|
---|
1430 | <td class="code"><div><Options for MyModel></div></td>
|
---|
1431 | </tr>
|
---|
1432 |
|
---|
1433 | <tr>
|
---|
1434 | <td>request</td>
|
---|
1435 | <td class="code"><div><WSGIRequest
|
---|
1436 | GET:<QueryDict: {u'p': [u'2']}>,
|
---|
1437 | POST:<QueryDict: {}>,
|
---|
1438 | COOKIES:{'__utma': '1.1814913469.1283793829.1283793829.1283793829.1',
|
---|
1439 | '__utmz': '1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
1440 | 'csrftoken': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
1441 | 'django_language': 'cs',
|
---|
1442 | 'sessionid': '8dfca394e11b853ff19f5ed43395f660'},
|
---|
1443 | META:{'CDPATH': '.:~:~/data/Fotky/netrideny-archiv',
|
---|
1444 | 'CONTENT_LENGTH': '',
|
---|
1445 | 'CONTENT_TYPE': 'text/plain',
|
---|
1446 | 'CSRF_COOKIE': 'b485bb44c526ebb351fafa8c64391d68',
|
---|
1447 | 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Z8z73Ec0l5,guid=586bf253f65eb398760c4e8b4c965042',
|
---|
1448 | 'DISPLAY': ':0.0',
|
---|
1449 | 'DJANGO_SETTINGS_MODULE': 'editabletest.settings',
|
---|
1450 | 'EDITOR': 'joe',
|
---|
1451 | 'EMAIL': 'tuttle@sandbox.cz',
|
---|
1452 | 'FIGNORE': '.o:~',
|
---|
1453 | 'GATEWAY_INTERFACE': 'CGI/1.1',
|
---|
1454 | 'GREP_COLOR': '1;34',
|
---|
1455 | 'GREP_OPTIONS': '--color=auto',
|
---|
1456 | 'HISTCONTROL': 'ignoreboth',
|
---|
1457 | 'HISTFILE': '/home/tuttle/.history_bash/bashhist.puk.20100919-204317.pid6014',
|
---|
1458 | 'HISTSIZE': '5000',
|
---|
1459 | 'HOME': '/home/tuttle',
|
---|
1460 | 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
---|
1461 | 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
---|
1462 | 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
|
---|
1463 | 'HTTP_ACCEPT_LANGUAGE': 'cs,en-us;q=0.7,en;q=0.3',
|
---|
1464 | 'HTTP_CONNECTION': 'keep-alive',
|
---|
1465 | 'HTTP_COOKIE': 'csrftoken=b485bb44c526ebb351fafa8c64391d68; sessionid=8dfca394e11b853ff19f5ed43395f660; django_language=cs; __utma=1.1814913469.1283793829.1283793829.1283793829.1; __utmz=1.1283793829.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
|
---|
1466 | 'HTTP_HOST': 'localhost:8081',
|
---|
1467 | 'HTTP_IF_NONE_MATCH': '"700c83e328799a470e5aa858da708e3d"',
|
---|
1468 | 'HTTP_KEEP_ALIVE': '115',
|
---|
1469 | 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11pre) Gecko/20100916 Ubuntu/9.10 (karmic) Namoroka/3.6.11pre',
|
---|
1470 | 'LANG': 'en_US.UTF-8',
|
---|
1471 | 'LESS': '-isMRnq#3~',
|
---|
1472 | 'LESSCLOSE': '/usr/bin/lesspipe %s %s',
|
---|
1473 | 'LESSOPEN': '| /usr/bin/lesspipe %s',
|
---|
1474 | 'LOGNAME': 'tuttle',
|
---|
1475 | 'OLDPWD': '/home/tuttle/tmp/editable-test',
|
---|
1476 | 'ORIGPHOTOS': '/home/tuttle/tmp/origpohotos',
|
---|
1477 | 'ORIGROTDIR': '/home/tuttle/tmp/origphotos',
|
---|
1478 | 'ORIGSHRINKDIR': '/home/tuttle/tmp/origpohotos',
|
---|
1479 | 'PATH': '~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
|
---|
1480 | 'PATH_INFO': u'/admin/edittest/mymodel/',
|
---|
1481 | 'PHOTOTARGET': '/home/tuttle/data/Fotky/netrideny-archiv',
|
---|
1482 | 'PROMPT_COMMAND': 'history -a',
|
---|
1483 | 'PS1': '\\[\\e]0;-\\a\\]`rctmp=$?; [ $rctmp != 0 ] && echo "(rc=$rctmp) "`\\[\\e[32m\\]\\D{%H%M%S} ${OLDPWD/#$HOME/~} \\[\\e[34m\\]\\h \\w\\[\\e[0m\\]\\n\\$ ',
|
---|
1484 | 'PWD': '/home/tuttle/tmp/editable-test/editabletest',
|
---|
1485 | 'PYTHONPATH': '/home/tuttle/tmp/editable-test/django-trunk/',
|
---|
1486 | 'QUERY_STRING': 'p=2',
|
---|
1487 | 'REMOTE_ADDR': '127.0.0.1',
|
---|
1488 | 'REMOTE_HOST': '',
|
---|
1489 | 'REQUEST_METHOD': 'GET',
|
---|
1490 | 'RUN_MAIN': 'true',
|
---|
1491 | 'SCRIPT_NAME': u'',
|
---|
1492 | 'SERVER_NAME': 'localhost',
|
---|
1493 | 'SERVER_PORT': '8081',
|
---|
1494 | 'SERVER_PROTOCOL': 'HTTP/1.1',
|
---|
1495 | 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.6.4',
|
---|
1496 | 'SHELL': '/bin/bash',
|
---|
1497 | 'SHLVL': '1',
|
---|
1498 | 'SSH_AGENT_PID': '4221',
|
---|
1499 | 'SSH_AUTH_SOCK': '/tmp/ssh-njGJdh4197/agent.4197',
|
---|
1500 | 'TERM': 'xterm',
|
---|
1501 | 'TZ': 'America/Chicago',
|
---|
1502 | 'USER': 'tuttle',
|
---|
1503 | 'VISUAL': 'joe',
|
---|
1504 | 'WINDOWID': '41943055',
|
---|
1505 | 'WINDOWPATH': '7',
|
---|
1506 | 'XDG_SESSION_COOKIE': 'bc7ed7881ec8274b22e18fab4b1e7747-1284919362.717707-2026208578',
|
---|
1507 | 'XTERM_LOCALE': 'en_US.UTF-8',
|
---|
1508 | 'XTERM_SHELL': '/bin/bash',
|
---|
1509 | 'XTERM_VERSION': 'XTerm(243)',
|
---|
1510 | '_': './manage.py',
|
---|
1511 | 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb761a0c0>,
|
---|
1512 | 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
|
---|
1513 | 'wsgi.input': <socket._fileobject object at 0x984b56c>,
|
---|
1514 | 'wsgi.multiprocess': False,
|
---|
1515 | 'wsgi.multithread': True,
|
---|
1516 | 'wsgi.run_once': False,
|
---|
1517 | 'wsgi.url_scheme': 'http',
|
---|
1518 | 'wsgi.version': (1, 0)}></div></td>
|
---|
1519 | </tr>
|
---|
1520 |
|
---|
1521 | <tr>
|
---|
1522 | <td>selected</td>
|
---|
1523 | <td class="code"><div>[]</div></td>
|
---|
1524 | </tr>
|
---|
1525 |
|
---|
1526 | <tr>
|
---|
1527 | <td>self</td>
|
---|
1528 | <td class="code"><div><editabletest.edittest.admin.MyModelAdmin object at 0x983dbac></div></td>
|
---|
1529 | </tr>
|
---|
1530 |
|
---|
1531 | </tbody>
|
---|
1532 | </table>
|
---|
1533 |
|
---|
1534 | </li>
|
---|
1535 |
|
---|
1536 | <li class="frame">
|
---|
1537 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/forms/models.py</code> in <code>__init__</code>
|
---|
1538 |
|
---|
1539 |
|
---|
1540 | <div class="context" id="c3047863836">
|
---|
1541 |
|
---|
1542 | <ol start="432" class="pre-context" id="pre3047863836"><li onclick="toggle('pre3047863836', 'post3047863836')"> model = None</li><li onclick="toggle('pre3047863836', 'post3047863836')"></li><li onclick="toggle('pre3047863836', 'post3047863836')"> def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None,</li><li onclick="toggle('pre3047863836', 'post3047863836')"> queryset=None, **kwargs):</li><li onclick="toggle('pre3047863836', 'post3047863836')"> self.queryset = queryset</li><li onclick="toggle('pre3047863836', 'post3047863836')"> defaults = {'data': data, 'files': files, 'auto_id': auto_id, 'prefix': prefix}</li><li onclick="toggle('pre3047863836', 'post3047863836')"> defaults.update(kwargs)</li></ol>
|
---|
1543 |
|
---|
1544 | <ol start="439" class="context-line"><li onclick="toggle('pre3047863836', 'post3047863836')"> super(BaseModelFormSet, self).__init__(**defaults) <span>...</span></li></ol>
|
---|
1545 |
|
---|
1546 | <ol start='440' class="post-context" id="post3047863836"><li onclick="toggle('pre3047863836', 'post3047863836')"></li><li onclick="toggle('pre3047863836', 'post3047863836')"> def initial_form_count(self):</li><li onclick="toggle('pre3047863836', 'post3047863836')"> """Returns the number of forms that are required in this FormSet."""</li><li onclick="toggle('pre3047863836', 'post3047863836')"> if not (self.data or self.files):</li><li onclick="toggle('pre3047863836', 'post3047863836')"> return len(self.get_queryset())</li><li onclick="toggle('pre3047863836', 'post3047863836')"> return super(BaseModelFormSet, self).initial_form_count()</li></ol>
|
---|
1547 |
|
---|
1548 | </div>
|
---|
1549 |
|
---|
1550 |
|
---|
1551 |
|
---|
1552 | <div class="commands">
|
---|
1553 | <a href="#" onclick="return varToggle(this, '3047863836')"><span>▶</span> Local vars</a>
|
---|
1554 | </div>
|
---|
1555 | <table class="vars" id="v3047863836">
|
---|
1556 | <thead>
|
---|
1557 | <tr>
|
---|
1558 | <th>Variable</th>
|
---|
1559 | <th>Value</th>
|
---|
1560 | </tr>
|
---|
1561 | </thead>
|
---|
1562 | <tbody>
|
---|
1563 |
|
---|
1564 | <tr>
|
---|
1565 | <td>auto_id</td>
|
---|
1566 | <td class="code"><div>'id_%s'</div></td>
|
---|
1567 | </tr>
|
---|
1568 |
|
---|
1569 | <tr>
|
---|
1570 | <td>data</td>
|
---|
1571 | <td class="code"><div>None</div></td>
|
---|
1572 | </tr>
|
---|
1573 |
|
---|
1574 | <tr>
|
---|
1575 | <td>defaults</td>
|
---|
1576 | <td class="code"><div>{'auto_id': 'id_%s', 'data': None, 'files': None, 'prefix': None}</div></td>
|
---|
1577 | </tr>
|
---|
1578 |
|
---|
1579 | <tr>
|
---|
1580 | <td>files</td>
|
---|
1581 | <td class="code"><div>None</div></td>
|
---|
1582 | </tr>
|
---|
1583 |
|
---|
1584 | <tr>
|
---|
1585 | <td>kwargs</td>
|
---|
1586 | <td class="code"><div>{}</div></td>
|
---|
1587 | </tr>
|
---|
1588 |
|
---|
1589 | <tr>
|
---|
1590 | <td>prefix</td>
|
---|
1591 | <td class="code"><div>None</div></td>
|
---|
1592 | </tr>
|
---|
1593 |
|
---|
1594 | <tr>
|
---|
1595 | <td>queryset</td>
|
---|
1596 | <td class="code"><div>()</div></td>
|
---|
1597 | </tr>
|
---|
1598 |
|
---|
1599 | <tr>
|
---|
1600 | <td>self</td>
|
---|
1601 | <td class="code"><div><django.forms.formsets.MyModelFormFormSet object at 0xb6869c6c></div></td>
|
---|
1602 | </tr>
|
---|
1603 |
|
---|
1604 | </tbody>
|
---|
1605 | </table>
|
---|
1606 |
|
---|
1607 | </li>
|
---|
1608 |
|
---|
1609 | <li class="frame">
|
---|
1610 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/forms/formsets.py</code> in <code>__init__</code>
|
---|
1611 |
|
---|
1612 |
|
---|
1613 | <div class="context" id="c3047865516">
|
---|
1614 |
|
---|
1615 | <ol start="40" class="pre-context" id="pre3047865516"><li onclick="toggle('pre3047865516', 'post3047865516')"> self.data = data</li><li onclick="toggle('pre3047865516', 'post3047865516')"> self.files = files</li><li onclick="toggle('pre3047865516', 'post3047865516')"> self.initial = initial</li><li onclick="toggle('pre3047865516', 'post3047865516')"> self.error_class = error_class</li><li onclick="toggle('pre3047865516', 'post3047865516')"> self._errors = None</li><li onclick="toggle('pre3047865516', 'post3047865516')"> self._non_form_errors = None</li><li onclick="toggle('pre3047865516', 'post3047865516')"> # construct the forms in the formset</li></ol>
|
---|
1616 |
|
---|
1617 | <ol start="47" class="context-line"><li onclick="toggle('pre3047865516', 'post3047865516')"> self._construct_forms() <span>...</span></li></ol>
|
---|
1618 |
|
---|
1619 | <ol start='48' class="post-context" id="post3047865516"><li onclick="toggle('pre3047865516', 'post3047865516')"></li><li onclick="toggle('pre3047865516', 'post3047865516')"> def __unicode__(self):</li><li onclick="toggle('pre3047865516', 'post3047865516')"> return self.as_table()</li><li onclick="toggle('pre3047865516', 'post3047865516')"></li><li onclick="toggle('pre3047865516', 'post3047865516')"> def _management_form(self):</li><li onclick="toggle('pre3047865516', 'post3047865516')"> """Returns the ManagementForm instance for this FormSet."""</li></ol>
|
---|
1620 |
|
---|
1621 | </div>
|
---|
1622 |
|
---|
1623 |
|
---|
1624 |
|
---|
1625 | <div class="commands">
|
---|
1626 | <a href="#" onclick="return varToggle(this, '3047865516')"><span>▶</span> Local vars</a>
|
---|
1627 | </div>
|
---|
1628 | <table class="vars" id="v3047865516">
|
---|
1629 | <thead>
|
---|
1630 | <tr>
|
---|
1631 | <th>Variable</th>
|
---|
1632 | <th>Value</th>
|
---|
1633 | </tr>
|
---|
1634 | </thead>
|
---|
1635 | <tbody>
|
---|
1636 |
|
---|
1637 | <tr>
|
---|
1638 | <td>auto_id</td>
|
---|
1639 | <td class="code"><div>'id_%s'</div></td>
|
---|
1640 | </tr>
|
---|
1641 |
|
---|
1642 | <tr>
|
---|
1643 | <td>data</td>
|
---|
1644 | <td class="code"><div>None</div></td>
|
---|
1645 | </tr>
|
---|
1646 |
|
---|
1647 | <tr>
|
---|
1648 | <td>error_class</td>
|
---|
1649 | <td class="code"><div><class 'django.forms.util.ErrorList'></div></td>
|
---|
1650 | </tr>
|
---|
1651 |
|
---|
1652 | <tr>
|
---|
1653 | <td>files</td>
|
---|
1654 | <td class="code"><div>None</div></td>
|
---|
1655 | </tr>
|
---|
1656 |
|
---|
1657 | <tr>
|
---|
1658 | <td>initial</td>
|
---|
1659 | <td class="code"><div>None</div></td>
|
---|
1660 | </tr>
|
---|
1661 |
|
---|
1662 | <tr>
|
---|
1663 | <td>prefix</td>
|
---|
1664 | <td class="code"><div>None</div></td>
|
---|
1665 | </tr>
|
---|
1666 |
|
---|
1667 | <tr>
|
---|
1668 | <td>self</td>
|
---|
1669 | <td class="code"><div><django.forms.formsets.MyModelFormFormSet object at 0xb6869c6c></div></td>
|
---|
1670 | </tr>
|
---|
1671 |
|
---|
1672 | </tbody>
|
---|
1673 | </table>
|
---|
1674 |
|
---|
1675 | </li>
|
---|
1676 |
|
---|
1677 | <li class="frame">
|
---|
1678 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/forms/formsets.py</code> in <code>_construct_forms</code>
|
---|
1679 |
|
---|
1680 |
|
---|
1681 | <div class="context" id="c3047864356">
|
---|
1682 |
|
---|
1683 | <ol start="89" class="pre-context" id="pre3047864356"><li onclick="toggle('pre3047864356', 'post3047864356')"> if initial_forms > self.max_num >= 0:</li><li onclick="toggle('pre3047864356', 'post3047864356')"> initial_forms = self.max_num</li><li onclick="toggle('pre3047864356', 'post3047864356')"> return initial_forms</li><li onclick="toggle('pre3047864356', 'post3047864356')"></li><li onclick="toggle('pre3047864356', 'post3047864356')"> def _construct_forms(self):</li><li onclick="toggle('pre3047864356', 'post3047864356')"> # instantiate all the forms and put them in self.forms</li><li onclick="toggle('pre3047864356', 'post3047864356')"> self.forms = []</li></ol>
|
---|
1684 |
|
---|
1685 | <ol start="96" class="context-line"><li onclick="toggle('pre3047864356', 'post3047864356')"> for i in xrange(self.total_form_count()): <span>...</span></li></ol>
|
---|
1686 |
|
---|
1687 | <ol start='97' class="post-context" id="post3047864356"><li onclick="toggle('pre3047864356', 'post3047864356')"> self.forms.append(self._construct_form(i))</li><li onclick="toggle('pre3047864356', 'post3047864356')"></li><li onclick="toggle('pre3047864356', 'post3047864356')"> def _construct_form(self, i, **kwargs):</li><li onclick="toggle('pre3047864356', 'post3047864356')"> """</li><li onclick="toggle('pre3047864356', 'post3047864356')"> Instantiates and returns the i-th form instance in a formset.</li><li onclick="toggle('pre3047864356', 'post3047864356')"> """</li></ol>
|
---|
1688 |
|
---|
1689 | </div>
|
---|
1690 |
|
---|
1691 |
|
---|
1692 |
|
---|
1693 | <div class="commands">
|
---|
1694 | <a href="#" onclick="return varToggle(this, '3047864356')"><span>▶</span> Local vars</a>
|
---|
1695 | </div>
|
---|
1696 | <table class="vars" id="v3047864356">
|
---|
1697 | <thead>
|
---|
1698 | <tr>
|
---|
1699 | <th>Variable</th>
|
---|
1700 | <th>Value</th>
|
---|
1701 | </tr>
|
---|
1702 | </thead>
|
---|
1703 | <tbody>
|
---|
1704 |
|
---|
1705 | <tr>
|
---|
1706 | <td>self</td>
|
---|
1707 | <td class="code"><div><django.forms.formsets.MyModelFormFormSet object at 0xb6869c6c></div></td>
|
---|
1708 | </tr>
|
---|
1709 |
|
---|
1710 | </tbody>
|
---|
1711 | </table>
|
---|
1712 |
|
---|
1713 | </li>
|
---|
1714 |
|
---|
1715 | <li class="frame">
|
---|
1716 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/forms/formsets.py</code> in <code>total_form_count</code>
|
---|
1717 |
|
---|
1718 |
|
---|
1719 | <div class="context" id="c3047863956">
|
---|
1720 |
|
---|
1721 | <ol start="65" class="pre-context" id="pre3047863956"><li onclick="toggle('pre3047863956', 'post3047863956')"> management_form = property(_management_form)</li><li onclick="toggle('pre3047863956', 'post3047863956')"></li><li onclick="toggle('pre3047863956', 'post3047863956')"> def total_form_count(self):</li><li onclick="toggle('pre3047863956', 'post3047863956')"> """Returns the total number of forms in this FormSet."""</li><li onclick="toggle('pre3047863956', 'post3047863956')"> if self.data or self.files:</li><li onclick="toggle('pre3047863956', 'post3047863956')"> return self.management_form.cleaned_data[TOTAL_FORM_COUNT]</li><li onclick="toggle('pre3047863956', 'post3047863956')"> else:</li></ol>
|
---|
1722 |
|
---|
1723 | <ol start="72" class="context-line"><li onclick="toggle('pre3047863956', 'post3047863956')"> initial_forms = self.initial_form_count() <span>...</span></li></ol>
|
---|
1724 |
|
---|
1725 | <ol start='73' class="post-context" id="post3047863956"><li onclick="toggle('pre3047863956', 'post3047863956')"> total_forms = initial_forms + self.extra</li><li onclick="toggle('pre3047863956', 'post3047863956')"> # Allow all existing related objects/inlines to be displayed,</li><li onclick="toggle('pre3047863956', 'post3047863956')"> # but don't allow extra beyond max_num.</li><li onclick="toggle('pre3047863956', 'post3047863956')"> if initial_forms > self.max_num >= 0:</li><li onclick="toggle('pre3047863956', 'post3047863956')"> total_forms = initial_forms</li><li onclick="toggle('pre3047863956', 'post3047863956')"> elif total_forms > self.max_num >= 0:</li></ol>
|
---|
1726 |
|
---|
1727 | </div>
|
---|
1728 |
|
---|
1729 |
|
---|
1730 |
|
---|
1731 | <div class="commands">
|
---|
1732 | <a href="#" onclick="return varToggle(this, '3047863956')"><span>▶</span> Local vars</a>
|
---|
1733 | </div>
|
---|
1734 | <table class="vars" id="v3047863956">
|
---|
1735 | <thead>
|
---|
1736 | <tr>
|
---|
1737 | <th>Variable</th>
|
---|
1738 | <th>Value</th>
|
---|
1739 | </tr>
|
---|
1740 | </thead>
|
---|
1741 | <tbody>
|
---|
1742 |
|
---|
1743 | <tr>
|
---|
1744 | <td>self</td>
|
---|
1745 | <td class="code"><div><django.forms.formsets.MyModelFormFormSet object at 0xb6869c6c></div></td>
|
---|
1746 | </tr>
|
---|
1747 |
|
---|
1748 | </tbody>
|
---|
1749 | </table>
|
---|
1750 |
|
---|
1751 | </li>
|
---|
1752 |
|
---|
1753 | <li class="frame">
|
---|
1754 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/forms/models.py</code> in <code>initial_form_count</code>
|
---|
1755 |
|
---|
1756 |
|
---|
1757 | <div class="context" id="c3047864596">
|
---|
1758 |
|
---|
1759 | <ol start="437" class="pre-context" id="pre3047864596"><li onclick="toggle('pre3047864596', 'post3047864596')"> defaults = {'data': data, 'files': files, 'auto_id': auto_id, 'prefix': prefix}</li><li onclick="toggle('pre3047864596', 'post3047864596')"> defaults.update(kwargs)</li><li onclick="toggle('pre3047864596', 'post3047864596')"> super(BaseModelFormSet, self).__init__(**defaults)</li><li onclick="toggle('pre3047864596', 'post3047864596')"></li><li onclick="toggle('pre3047864596', 'post3047864596')"> def initial_form_count(self):</li><li onclick="toggle('pre3047864596', 'post3047864596')"> """Returns the number of forms that are required in this FormSet."""</li><li onclick="toggle('pre3047864596', 'post3047864596')"> if not (self.data or self.files):</li></ol>
|
---|
1760 |
|
---|
1761 | <ol start="444" class="context-line"><li onclick="toggle('pre3047864596', 'post3047864596')"> return len(self.get_queryset()) <span>...</span></li></ol>
|
---|
1762 |
|
---|
1763 | <ol start='445' class="post-context" id="post3047864596"><li onclick="toggle('pre3047864596', 'post3047864596')"> return super(BaseModelFormSet, self).initial_form_count()</li><li onclick="toggle('pre3047864596', 'post3047864596')"></li><li onclick="toggle('pre3047864596', 'post3047864596')"> def _existing_object(self, pk):</li><li onclick="toggle('pre3047864596', 'post3047864596')"> if not hasattr(self, '_object_dict'):</li><li onclick="toggle('pre3047864596', 'post3047864596')"> self._object_dict = dict([(o.pk, o) for o in self.get_queryset()])</li><li onclick="toggle('pre3047864596', 'post3047864596')"> return self._object_dict.get(pk)</li></ol>
|
---|
1764 |
|
---|
1765 | </div>
|
---|
1766 |
|
---|
1767 |
|
---|
1768 |
|
---|
1769 | <div class="commands">
|
---|
1770 | <a href="#" onclick="return varToggle(this, '3047864596')"><span>▶</span> Local vars</a>
|
---|
1771 | </div>
|
---|
1772 | <table class="vars" id="v3047864596">
|
---|
1773 | <thead>
|
---|
1774 | <tr>
|
---|
1775 | <th>Variable</th>
|
---|
1776 | <th>Value</th>
|
---|
1777 | </tr>
|
---|
1778 | </thead>
|
---|
1779 | <tbody>
|
---|
1780 |
|
---|
1781 | <tr>
|
---|
1782 | <td>self</td>
|
---|
1783 | <td class="code"><div><django.forms.formsets.MyModelFormFormSet object at 0xb6869c6c></div></td>
|
---|
1784 | </tr>
|
---|
1785 |
|
---|
1786 | </tbody>
|
---|
1787 | </table>
|
---|
1788 |
|
---|
1789 | </li>
|
---|
1790 |
|
---|
1791 | <li class="frame">
|
---|
1792 | <code>/home/tuttle/tmp/editable-test/django-trunk/django/forms/models.py</code> in <code>get_queryset</code>
|
---|
1793 |
|
---|
1794 |
|
---|
1795 | <div class="context" id="c3047862836">
|
---|
1796 |
|
---|
1797 | <ol start="469" class="pre-context" id="pre3047862836"><li onclick="toggle('pre3047862836', 'post3047862836')"> qs = self.queryset</li><li onclick="toggle('pre3047862836', 'post3047862836')"> else:</li><li onclick="toggle('pre3047862836', 'post3047862836')"> qs = self.model._default_manager.get_query_set()</li><li onclick="toggle('pre3047862836', 'post3047862836')"></li><li onclick="toggle('pre3047862836', 'post3047862836')"> # If the queryset isn't already ordered we need to add an</li><li onclick="toggle('pre3047862836', 'post3047862836')"> # artificial ordering here to make sure that all formsets</li><li onclick="toggle('pre3047862836', 'post3047862836')"> # constructed from this queryset have the same form order.</li></ol>
|
---|
1798 |
|
---|
1799 | <ol start="476" class="context-line"><li onclick="toggle('pre3047862836', 'post3047862836')"> if not qs.ordered: <span>...</span></li></ol>
|
---|
1800 |
|
---|
1801 | <ol start='477' class="post-context" id="post3047862836"><li onclick="toggle('pre3047862836', 'post3047862836')"> qs = qs.order_by(self.model._meta.pk.name)</li><li onclick="toggle('pre3047862836', 'post3047862836')"></li><li onclick="toggle('pre3047862836', 'post3047862836')"> # Removed queryset limiting here. As per discussion re: #13023</li><li onclick="toggle('pre3047862836', 'post3047862836')"> # on django-dev, max_num should not prevent existing</li><li onclick="toggle('pre3047862836', 'post3047862836')"> # related objects/inlines from being displayed.</li><li onclick="toggle('pre3047862836', 'post3047862836')"> self._queryset = qs</li></ol>
|
---|
1802 |
|
---|
1803 | </div>
|
---|
1804 |
|
---|
1805 |
|
---|
1806 |
|
---|
1807 | <div class="commands">
|
---|
1808 | <a href="#" onclick="return varToggle(this, '3047862836')"><span>▶</span> Local vars</a>
|
---|
1809 | </div>
|
---|
1810 | <table class="vars" id="v3047862836">
|
---|
1811 | <thead>
|
---|
1812 | <tr>
|
---|
1813 | <th>Variable</th>
|
---|
1814 | <th>Value</th>
|
---|
1815 | </tr>
|
---|
1816 | </thead>
|
---|
1817 | <tbody>
|
---|
1818 |
|
---|
1819 | <tr>
|
---|
1820 | <td>qs</td>
|
---|
1821 | <td class="code"><div>()</div></td>
|
---|
1822 | </tr>
|
---|
1823 |
|
---|
1824 | <tr>
|
---|
1825 | <td>self</td>
|
---|
1826 | <td class="code"><div><django.forms.formsets.MyModelFormFormSet object at 0xb6869c6c></div></td>
|
---|
1827 | </tr>
|
---|
1828 |
|
---|
1829 | </tbody>
|
---|
1830 | </table>
|
---|
1831 |
|
---|
1832 | </li>
|
---|
1833 |
|
---|
1834 | </ul>
|
---|
1835 | </div>
|
---|
1836 |
|
---|
1837 | <form action="http://dpaste.com/" name="pasteform" id="pasteform" method="post">
|
---|
1838 | <div id="pastebinTraceback" class="pastebin">
|
---|
1839 | <input type="hidden" name="language" value="PythonConsole">
|
---|
1840 | <input type="hidden" name="title" value="AttributeError at /admin/edittest/mymodel/">
|
---|
1841 | <input type="hidden" name="source" value="Django Dpaste Agent">
|
---|
1842 | <input type="hidden" name="poster" value="Django">
|
---|
1843 | <textarea name="content" id="traceback_area" cols="140" rows="25">
|
---|
1844 | Environment:
|
---|
1845 |
|
---|
1846 | Request Method: GET
|
---|
1847 | Request URL: http://localhost:8081/admin/edittest/mymodel/?p=2
|
---|
1848 | Django Version: 1.3 pre-alpha SVN-13863
|
---|
1849 | Python Version: 2.6.4
|
---|
1850 | Installed Applications:
|
---|
1851 | ['django.contrib.auth',
|
---|
1852 | 'django.contrib.contenttypes',
|
---|
1853 | 'django.contrib.sessions',
|
---|
1854 | 'django.contrib.sites',
|
---|
1855 | 'django.contrib.messages',
|
---|
1856 | 'django.contrib.admin',
|
---|
1857 | 'editabletest.edittest']
|
---|
1858 | Installed Middleware:
|
---|
1859 | ('django.middleware.common.CommonMiddleware',
|
---|
1860 | 'django.contrib.sessions.middleware.SessionMiddleware',
|
---|
1861 | 'django.middleware.csrf.CsrfViewMiddleware',
|
---|
1862 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
---|
1863 | 'django.contrib.messages.middleware.MessageMiddleware')
|
---|
1864 |
|
---|
1865 |
|
---|
1866 | Traceback:
|
---|
1867 | File "/home/tuttle/tmp/editable-test/django-trunk/django/core/handlers/base.py" in get_response
|
---|
1868 | 100. response = callback(request, *callback_args, **callback_kwargs)
|
---|
1869 | File "/home/tuttle/tmp/editable-test/django-trunk/django/contrib/admin/options.py" in wrapper
|
---|
1870 | 245. return self.admin_site.admin_view(view)(*args, **kwargs)
|
---|
1871 | File "/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py" in _wrapped_view
|
---|
1872 | 76. response = view_func(request, *args, **kwargs)
|
---|
1873 | File "/home/tuttle/tmp/editable-test/django-trunk/django/views/decorators/cache.py" in _wrapped_view_func
|
---|
1874 | 69. response = view_func(request, *args, **kwargs)
|
---|
1875 | File "/home/tuttle/tmp/editable-test/django-trunk/django/contrib/admin/sites.py" in inner
|
---|
1876 | 190. return view(request, *args, **kwargs)
|
---|
1877 | File "/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py" in _wrapper
|
---|
1878 | 21. return decorator(bound_func)(*args, **kwargs)
|
---|
1879 | File "/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py" in _wrapped_view
|
---|
1880 | 76. response = view_func(request, *args, **kwargs)
|
---|
1881 | File "/home/tuttle/tmp/editable-test/django-trunk/django/utils/decorators.py" in bound_func
|
---|
1882 | 17. return func(self, *args2, **kwargs2)
|
---|
1883 | File "/home/tuttle/tmp/editable-test/django-trunk/django/contrib/admin/options.py" in changelist_view
|
---|
1884 | 1057. formset = cl.formset = FormSet(queryset=cl.result_list)
|
---|
1885 | File "/home/tuttle/tmp/editable-test/django-trunk/django/forms/models.py" in __init__
|
---|
1886 | 439. super(BaseModelFormSet, self).__init__(**defaults)
|
---|
1887 | File "/home/tuttle/tmp/editable-test/django-trunk/django/forms/formsets.py" in __init__
|
---|
1888 | 47. self._construct_forms()
|
---|
1889 | File "/home/tuttle/tmp/editable-test/django-trunk/django/forms/formsets.py" in _construct_forms
|
---|
1890 | 96. for i in xrange(self.total_form_count()):
|
---|
1891 | File "/home/tuttle/tmp/editable-test/django-trunk/django/forms/formsets.py" in total_form_count
|
---|
1892 | 72. initial_forms = self.initial_form_count()
|
---|
1893 | File "/home/tuttle/tmp/editable-test/django-trunk/django/forms/models.py" in initial_form_count
|
---|
1894 | 444. return len(self.get_queryset())
|
---|
1895 | File "/home/tuttle/tmp/editable-test/django-trunk/django/forms/models.py" in get_queryset
|
---|
1896 | 476. if not qs.ordered:
|
---|
1897 |
|
---|
1898 | Exception Type: AttributeError at /admin/edittest/mymodel/
|
---|
1899 | Exception Value: 'tuple' object has no attribute 'ordered'
|
---|
1900 | </textarea>
|
---|
1901 | <br><br>
|
---|
1902 | <input type="submit" value="Share this traceback on a public Web site">
|
---|
1903 | </div>
|
---|
1904 | </form>
|
---|
1905 | </div>
|
---|
1906 |
|
---|
1907 | </body>
|
---|
1908 | </html>
|
---|