No module named wysiwyg

186 views
Skip to first unread message

Michael Hipp

unread,
Feb 5, 2010, 10:31:50 PM2/5/10
to django-b...@googlegroups.com
I'm trying to install basic.blog and trundling thru the dependencies one
at at time, but I'm stuck on this one. I've done 'easy_install
django-wysiwyg'. Anyone know how to fix this?

Thanks,
Michael

-----------------------------------------


TemplateSyntaxError at /admin/blog/post/add/

'wysiwyg' is not a valid tag library: Could not load template library
from django.templatetags.wysiwyg, No module named wysiwyg

Request Method: GET
Request URL: http://localhost:8000/admin/blog/post/add/
Exception Type: TemplateSyntaxError
Exception Value:

'wysiwyg' is not a valid tag library: Could not load template library
from django.templatetags.wysiwyg, No module named wysiwyg

Exception Location: c:\oss\django\django\template\defaulttags.py in
load, line 927
Python Executable: C:\Python26\python.exe
Python Version: 2.6.3
Python Path: ['C:\\dropbox\\djcode', 'C:\\dropbox\\djcode\\redmule',
'C:\\Python26\\lib\\site-packages\\pip-0.6.1-py2.6.egg',
'C:\\Python26\\lib\\site-packages\\django_tagging-0.3.1-py2.6.egg',
'C:\\Python26\\lib\\site-packages\\django_markup-0.3-py2.6.egg',
'C:\\Python26\\lib\\site-packages\\simplejson-2.0.9-py2.6.egg',
'C:\\Python26\\lib\\site-packages\\django_tinymce-1.5-py2.6.egg',
'C:\\Python26\\lib\\site-packages\\django_inlines-0.7.4-py2.6.egg',
'C:\\Python26\\lib\\site-packages\\beautifulsoup-3.1.0.1-py2.6.egg',
'C:\\Python26\\lib\\site-packages\\django_wysiwyg-0.1.0-py2.6.egg',
'C:\\Windows\\system32\\python26.zip', 'C:\\Python26\\DLLs',
'C:\\Python26\\lib', 'C:\\Python26\\lib\\plat-win',
'C:\\Python26\\lib\\lib-tk', 'C:\\Python26',
'C:\\Python26\\lib\\site-packages',
'C:\\Python26\\lib\\site-packages\\PIL',
'C:\\Python26\\lib\\site-packages', 'c:\\oss', 'c:\\oss\\django',
'c:\\oss\\django-cms\\2.1', 'c:\\oss\\geraldo', 'c:\\projects',
'c:\\dropbox', 'c:\\dropbox\\djcode',
'C:\\Python26\\lib\\site-packages\\win32',
'C:\\Python26\\lib\\site-packages\\win32\\lib',
'C:\\Python26\\lib\\site-packages\\Pythonwin',
'C:\\Python26\\lib\\site-packages\\wx-2.8-msw-ansi']
Server time: Fri, 5 Feb 2010 21:29:42 -0600
Template error

In template
c:\oss\basic\blog\templates\admin\blog\post\change_form.html, error at
line 107
'wysiwyg' is not a valid tag library: Could not load template library
from django.templatetags.wysiwyg, No module named wysiwyg
97 hideMarkup();
98 });
99 {% endifequal %}
100
101 </script>
102 {% endblock %}
103
104
105 {% block footer %}
106 {% ifequal active_editor 3 %}
107 {% load wysiwyg %}
108 {% wysiwyg_setup %}
109 {% wysiwyg_editor "id_body" %}
110 {% endifequal %}
111 <div id="footer"></div>
112 {% endblock %}
113
Traceback Switch to copy-and-paste view

* c:\oss\django\django\core\handlers\base.py in get_response
85. # Apply view middleware
86. for middleware_method in self._view_middleware:
87. response = middleware_method(request, callback,
callback_args, callback_kwargs)
88. if response:
89. return response
90.
91. try:
92. response = callback(request, *callback_args,
**callback_kwargs) ...
93. except Exception, e:
94. # If the view raised an exception, run it through exception
95. # middleware, and if the exception middleware returns a
96. # response, use that. Otherwise, reraise the exception.
97. for middleware_method in self._exception_middleware:
98. response = middleware_method(request, e)
▶ Local vars
Variable Value
callback
<function add_view at 0x02C53CB0>
callback_args
()
callback_kwargs
{}
e
TemplateSyntaxError(u"'wysiwyg' is not a valid tag library: Could
not load template library from django.templatetags.wysiwyg, No module
named wysiwyg",)
exc_info
(<class 'django.template.TemplateSyntaxError'>,
TemplateSyntaxError(u"'wysiwyg' is not a valid tag library: Could not
load template library from django.templatetags.wysiwyg, No module named
wysiwyg",), <traceback object at 0x02D375D0>)
exceptions
<module 'django.core.exceptions' from
'c:\oss\django\django\core\exceptions.pyc'>
middleware_method
<bound method XViewMiddleware.process_view of
<django.middleware.doc.XViewMiddleware object at 0x029E06B0>>
receivers
[(<function _rollback_on_exception at 0x023A2A70>, None)]
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>,
COOKIES:{'sessionid': 'b9b6ebfa858a76b1fd69834371f62ea9'},
META:{'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA':
'C:\\Users\\michael\\AppData\\Roaming', 'COMMONPROGRAMFILES':
'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'MRHLAPTOP',
'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE':
'redmule.settings', 'EDITOR': 'notepad.exe', 'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR': 'c:\\bin\\git', 'GOARCH':
'386', 'GOOS': 'mingw', 'GOROOT': 'c:\\oss\\go', 'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Users\\michael', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>
resolver
<RegexURLResolver redmule.urls (None:None) ^/>
response
None
self
<django.core.handlers.wsgi.WSGIHandler object at 0x026B3430>
settings
<django.conf.LazySettings object at 0x018A3870>
urlconf
'redmule.urls'
urlresolvers
<module 'django.core.urlresolvers' from
'c:\oss\django\django\core\urlresolvers.pyc'>
* c:\oss\django\django\contrib\admin\options.py in wrapper
219. super(ModelAdmin, self).__init__()
220.
221. def get_urls(self):
222. from django.conf.urls.defaults import patterns, url
223.
224. def wrap(view):
225. def wrapper(*args, **kwargs):
226. return self.admin_site.admin_view(view)(*args, **kwargs) ...
227. return update_wrapper(wrapper, view)
228.
229. info = self.model._meta.app_label, self.model._meta.module_name
230.
231. urlpatterns = patterns('',
232. url(r'^$',
▶ Local vars
Variable Value
args
(<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>,
COOKIES:{'sessionid': 'b9b6ebfa858a76b1fd69834371f62ea9'},
META:{'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA':
'C:\\Users\\michael\\AppData\\Roaming', 'COMMONPROGRAMFILES':
'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'MRHLAPTOP',
'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE':
'redmule.settings', 'EDITOR': 'notepad.exe', 'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR': 'c:\\bin\\git', 'GOARCH':
'386', 'GOOS': 'mingw', 'GOROOT': 'c:\\oss\\go', 'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Users\\michael', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>,)
kwargs
{}
self
<basic.blog.admin.PostAdmin object at 0x02CA9830>
view
<bound method PostAdmin.add_view of <basic.blog.admin.PostAdmin
object at 0x02CA9830>>
* c:\oss\django\django\views\decorators\cache.py in _wrapped_view_func
37.
38. def never_cache(view_func):
39. """
40. Decorator that adds headers to a response so that it will
41. never be cached.
42. """
43. def _wrapped_view_func(request, *args, **kwargs):
44. response = view_func(request, *args, **kwargs) ...
45. add_never_cache_headers(response)
46. return response
47. return wraps(view_func)(_wrapped_view_func)
▶ Local vars
Variable Value
args
()
kwargs
{}
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>,
COOKIES:{'sessionid': 'b9b6ebfa858a76b1fd69834371f62ea9'},
META:{'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA':
'C:\\Users\\michael\\AppData\\Roaming', 'COMMONPROGRAMFILES':
'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'MRHLAPTOP',
'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE':
'redmule.settings', 'EDITOR': 'notepad.exe', 'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR': 'c:\\bin\\git', 'GOARCH':
'386', 'GOOS': 'mingw', 'GOROOT': 'c:\\oss\\go', 'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Users\\michael', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>
view_func
<function inner at 0x03A9EBF0>
* c:\oss\django\django\contrib\admin\sites.py in inner
179. By default, admin_views are marked non-cacheable using the
180. ``never_cache`` decorator. If the view can be safely
cached, set
181. cacheable=True.
182. """
183. def inner(request, *args, **kwargs):
184. if not self.has_permission(request):
185. return self.login(request)
186. return view(request, *args, **kwargs) ...
187. if not cacheable:
188. inner = never_cache(inner)
189. return update_wrapper(inner, view)
190.
191. def get_urls(self):
192. from django.conf.urls.defaults import patterns, url, include
▶ Local vars
Variable Value
args
()
kwargs
{}
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>,
COOKIES:{'sessionid': 'b9b6ebfa858a76b1fd69834371f62ea9'},
META:{'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA':
'C:\\Users\\michael\\AppData\\Roaming', 'COMMONPROGRAMFILES':
'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'MRHLAPTOP',
'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE':
'redmule.settings', 'EDITOR': 'notepad.exe', 'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR': 'c:\\bin\\git', 'GOARCH':
'386', 'GOOS': 'mingw', 'GOROOT': 'c:\\oss\\go', 'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Users\\michael', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>
self
<django.contrib.admin.sites.AdminSite object at 0x0276EC50>
view
<bound method PostAdmin.add_view of <basic.blog.admin.PostAdmin
object at 0x02CA9830>>
* c:\oss\basic\blog\admin.py in add_view
62.
63. def add_view(self, request, form_url='', extra_context=None):
64. blog_settings = Settings.get_current()
65. tinymce_isactive = False
66. if blog_settings != None:
67. active_editor = blog_settings.active_editor
68. extra_context = { 'active_editor': active_editor }
69. return super(PostAdmin, self).add_view(request, form_url,
extra_context) ...
70.
71. def change_view(self, request, object_id, extra_context=None):
72. blog_settings = Settings.get_current()
73. tinymce_isactive = False
74. if blog_settings != None:
75. active_editor = blog_settings.active_editor
▶ Local vars
Variable Value
active_editor
2
blog_settings
<Settings: RedMule Technologies-settings>
extra_context
{'active_editor': 2}
form_url
''
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>,
COOKIES:{'sessionid': 'b9b6ebfa858a76b1fd69834371f62ea9'},
META:{'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA':
'C:\\Users\\michael\\AppData\\Roaming', 'COMMONPROGRAMFILES':
'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'MRHLAPTOP',
'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE':
'redmule.settings', 'EDITOR': 'notepad.exe', 'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR': 'c:\\bin\\git', 'GOARCH':
'386', 'GOOS': 'mingw', 'GOROOT': 'c:\\oss\\go', 'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Users\\michael', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>
self
<basic.blog.admin.PostAdmin object at 0x02CA9830>
tinymce_isactive
False
* c:\oss\django\django\db\transaction.py in _commit_on_success
233. control in web apps.
234. """
235. def _commit_on_success(*args, **kw):
236. try:
237. enter_transaction_management()
238. managed(True)
239. try:
240. res = func(*args, **kw) ...
241. except:
242. # All exceptions must be handled here (even string ones).
243. if is_dirty():
244. rollback()
245. raise
246. else:
▶ Local vars
Variable Value
args
(<basic.blog.admin.PostAdmin object at 0x02CA9830>, <WSGIRequest
GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'sessionid':
'b9b6ebfa858a76b1fd69834371f62ea9'}, META:{'ALLUSERSPROFILE':
'C:\\ProgramData', 'APPDATA': 'C:\\Users\\michael\\AppData\\Roaming',
'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMPUTERNAME':
'MRHLAPTOP', 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',
'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'text/plain',
'DJANGO_SETTINGS_MODULE': 'redmule.settings', 'EDITOR': 'notepad.exe',
'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR':
'c:\\bin\\git', 'GOARCH': '386', 'GOOS': 'mingw', 'GOROOT':
'c:\\oss\\go', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\Users\\michael',
'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>, '', {'active_editor': 2})
func
<function add_view at 0x02767CF0>
kw
{}
* c:\oss\django\django\contrib\admin\options.py in add_view
777. 'media': mark_safe(media),
778. 'inline_admin_formsets': inline_admin_formsets,
779. 'errors': helpers.AdminErrorList(form, formsets),
780. 'root_path': self.admin_site.root_path,
781. 'app_label': opts.app_label,
782. }
783. context.update(extra_context or {})
784. return self.render_change_form(request, context,
form_url=form_url, add=True) ...
785. add_view = transaction.commit_on_success(add_view)
786.
787. def change_view(self, request, object_id, extra_context=None):
788. "The 'change' admin view for this model."
789. model = self.model
790. opts = model._meta
▶ Local vars
Variable Value
ModelForm
<class 'django.forms.models.PostForm'>
adminForm
<django.contrib.admin.helpers.AdminForm object at 0x02C3FB90>
context
{'active_editor': 2, 'add': True, 'adminform':
<django.contrib.admin.helpers.AdminForm object at 0x02C3FB90>,
'app_label': 'blog', 'change': False, 'content_type_id': 37, 'errors':
[], 'form_url': '', 'has_absolute_url': True, 'has_add_permission':
True, 'has_change_permission': True, 'has_delete_permission': True,
'has_file_field': True, 'inline_admin_formsets': [], 'is_popup': False,
'media': '<script type="text/javascript"
src="/media/admin/js/core.js"></script>\n<script type="text/javascript"
src="/media/admin/js/admin/RelatedObjectLookups.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/getElementsBySelector.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/actions.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/urlify.js"></script>\n<script
type="text/javascript"
src="/media/js/tiny_mce/tiny_mce.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/calendar.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/admin/DateTimeShortcuts.js"></script>', 'opts':
<Options for Post>, 'ordered_objects': [], 'root_path': '/admin/',
'save_as': False, 'save_on_top': False, 'show_delete': False, 'title':
u'Add post'}
extra_context
{'active_editor': 2}
form
<django.forms.models.PostForm object at 0x02C3F930>
form_url
''
formsets
[]
initial
{}
inline_admin_formsets
[]
media
<django.forms.widgets.Media object at 0x02C6DCF0>
model
<class 'basic.blog.models.Post'>
opts
<Options for Post>
prefixes
{}
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>,
COOKIES:{'sessionid': 'b9b6ebfa858a76b1fd69834371f62ea9'},
META:{'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA':
'C:\\Users\\michael\\AppData\\Roaming', 'COMMONPROGRAMFILES':
'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'MRHLAPTOP',
'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE':
'redmule.settings', 'EDITOR': 'notepad.exe', 'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR': 'c:\\bin\\git', 'GOARCH':
'386', 'GOOS': 'mingw', 'GOROOT': 'c:\\oss\\go', 'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Users\\michael', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>
self
<basic.blog.admin.PostAdmin object at 0x02CA9830>
* c:\oss\django\django\contrib\admin\options.py in render_change_form
583. 'root_path': self.admin_site.root_path,
584. })
585. context_instance = template.RequestContext(request,
current_app=self.admin_site.name)
586. return render_to_response(self.change_form_template or [
587. "admin/%s/%s/change_form.html" % (app_label,
opts.object_name.lower()),
588. "admin/%s/change_form.html" % app_label,
589. "admin/change_form.html"
590. ], context, context_instance=context_instance) ...
591.
592. def response_add(self, request, obj,
post_url_continue='../%s/'):
593. """
594. Determines the HttpResponse for the add_view stage.
595. """
596. opts = obj._meta
▶ Local vars
Variable Value
add
True
app_label
'blog'
change
False
context
{'active_editor': 2, 'add': True, 'adminform':
<django.contrib.admin.helpers.AdminForm object at 0x02C3FB90>,
'app_label': 'blog', 'change': False, 'content_type_id': 37, 'errors':
[], 'form_url': '', 'has_absolute_url': True, 'has_add_permission':
True, 'has_change_permission': True, 'has_delete_permission': True,
'has_file_field': True, 'inline_admin_formsets': [], 'is_popup': False,
'media': '<script type="text/javascript"
src="/media/admin/js/core.js"></script>\n<script type="text/javascript"
src="/media/admin/js/admin/RelatedObjectLookups.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/getElementsBySelector.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/actions.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/urlify.js"></script>\n<script
type="text/javascript"
src="/media/js/tiny_mce/tiny_mce.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/calendar.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/admin/DateTimeShortcuts.js"></script>', 'opts':
<Options for Post>, 'ordered_objects': [], 'root_path': '/admin/',
'save_as': False, 'save_on_top': False, 'show_delete': False, 'title':
u'Add post'}
context_instance
[{'advocacy_comment': u'Python is the most imminently
<i>useful</i> programming language available. From extensive libraries
to platform portability and a powerful but stunningly simple syntax it
is set apart from all competitors.', 'advocacy_href': u'<a
href="http://www.python.org">\r\n <img border="0" alt="Program with
Python!" title="Program with Python!"
src="http://python.org/community/logos/python-logo.png"/>\r\n </a>',
'advocacy_link': u'', 'advocacy_graphic': <ImageFieldFile: None>},
{'wisdom_attribution': u'1 Corinthians 1:27', 'wisdom_text': u'But God
hath chosen the foolish things of the world to confound the wise; and
God hath chosen the weak things of the world to confound the things
which are mighty;', 'wisdom_link': u''}, {'CMS_MEDIA_URL':
'/media/cms/'}, {'MEDIA_URL': '/media/'}, {'request': <WSGIRequest
GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'sessionid':
'b9b6ebfa858a76b1fd69834371f62ea9'}, META:{'ALLUSERSPROFILE':
'C:\\ProgramData', 'APPDATA': 'C:\\Users\\michael\\AppData\\Roaming',
'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMPUTERNAME':
'MRHLAPTOP', 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',
'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'text/plain',
'DJANGO_SETTINGS_MODULE': 'redmule.settings', 'EDITOR': 'notepad.exe',
'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR':
'c:\\bin\\git', 'GOARCH': '386', 'GOOS': 'mingw', 'GOROOT':
'c:\\oss\\go', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\Users\\michael',
'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>}, {'debug': True, 'sql_queries':
[{'time': '0.000', 'sql': 'SELECT "django_session"."session_key",
"django_session"."session_data", "django_session"."expire_date" FROM
"django_session" WHERE ("django_session"."session_key" =
E\'b9b6ebfa858a76b1fd69834371f62ea9\' AND "django_session"."expire_date"
> E\'2010-02-05 21:29:41.908000\' )'}, {'time': '0.000', 'sql': 'SELECT
"auth_user"."id", "auth_user"."username", "auth_user"."first_name",
"auth_user"."last_name", "auth_user"."email", "auth_user"."password",
"auth_user"."is_staff", "auth_user"."is_active",
"auth_user"."is_superuser", "auth_user"."last_login",
"auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = 1
'}, {'time': '0.000', 'sql': 'SELECT "auth_message"."id",
"auth_message"."user_id", "auth_message"."message" FROM "auth_message"
WHERE "auth_message"."user_id" = 1 '}, {'time': '0.015', 'sql': 'SELECT
"wisdom_wisdom"."id", "wisdom_wisdom"."content",
"wisdom_wisdom"."attribution", "wisdom_wisdom"."link",
"wisdom_wisdom"."category", "wisdom_wisdom"."updated" FROM
"wisdom_wisdom"'}, {'time': '0.000', 'sql': 'SELECT
"advocacy_advocacy"."id", "advocacy_advocacy"."comment",
"advocacy_advocacy"."href", "advocacy_advocacy"."link",
"advocacy_advocacy"."graphic", "advocacy_advocacy"."updated" FROM
"advocacy_advocacy"'}, {'time': '0.000', 'sql': 'SELECT
"django_site"."id", "django_site"."domain", "django_site"."name" FROM
"django_site" WHERE "django_site"."id" = 1 ORDER BY
"django_site"."domain" ASC'}]}, {'perms':
<django.core.context_processors.PermWrapper object at 0x02C4F8F0>,
'messages': [], 'user': <User: michael>}, {}]
form_url
''
obj
None
opts
<Options for Post>
ordered_objects
[]
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>,
COOKIES:{'sessionid': 'b9b6ebfa858a76b1fd69834371f62ea9'},
META:{'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA':
'C:\\Users\\michael\\AppData\\Roaming', 'COMMONPROGRAMFILES':
'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'MRHLAPTOP',
'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE':
'redmule.settings', 'EDITOR': 'notepad.exe', 'FP_NO_HOST_CHECK': 'NO',
'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR': 'c:\\bin\\git', 'GOARCH':
'386', 'GOOS': 'mingw', 'GOROOT': 'c:\\oss\\go', 'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Users\\michael', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>
self
<basic.blog.admin.PostAdmin object at 0x02CA9830>
* c:\oss\django\django\shortcuts\__init__.py in render_to_response
13.
14. def render_to_response(*args, **kwargs):
15. """
16. Returns a HttpResponse whose content is filled with the
result of calling
17. django.template.loader.render_to_string() with the passed
arguments.
18. """
19. httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype',
None)}
20. return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs) ...
21.
22. def redirect(to, *args, **kwargs):
23. """
24. Returns an HttpResponseRedirect to the apropriate URL for
the arguments
25. passed.
26.
▶ Local vars
Variable Value
args
(['admin/blog/post/change_form.html',
'admin/blog/change_form.html', 'admin/change_form.html'],
{'active_editor': 2, 'add': True, 'adminform':
<django.contrib.admin.helpers.AdminForm object at 0x02C3FB90>,
'app_label': 'blog', 'change': False, 'content_type_id': 37, 'errors':
[], 'form_url': '', 'has_absolute_url': True, 'has_add_permission':
True, 'has_change_permission': True, 'has_delete_permission': True,
'has_file_field': True, 'inline_admin_formsets': [], 'is_popup': False,
'media': '<script type="text/javascript"
src="/media/admin/js/core.js"></script>\n<script type="text/javascript"
src="/media/admin/js/admin/RelatedObjectLookups.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/getElementsBySelector.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/actions.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/urlify.js"></script>\n<script
type="text/javascript"
src="/media/js/tiny_mce/tiny_mce.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/calendar.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/admin/DateTimeShortcuts.js"></script>', 'opts':
<Options for Post>, 'ordered_objects': [], 'root_path': '/admin/',
'save_as': False, 'save_on_top': False, 'show_delete': False, 'title':
u'Add post'})
httpresponse_kwargs
{'mimetype': None}
kwargs
{'context_instance': [{'advocacy_comment': u'Python is the most
imminently <i>useful</i> programming language available. From extensive
libraries to platform portability and a powerful but stunningly simple
syntax it is set apart from all competitors.', 'advocacy_href': u'<a
href="http://www.python.org">\r\n <img border="0" alt="Program with
Python!" title="Program with Python!"
src="http://python.org/community/logos/python-logo.png"/>\r\n </a>',
'advocacy_link': u'', 'advocacy_graphic': <ImageFieldFile: None>},
{'wisdom_attribution': u'1 Corinthians 1:27', 'wisdom_text': u'But God
hath chosen the foolish things of the world to confound the wise; and
God hath chosen the weak things of the world to confound the things
which are mighty;', 'wisdom_link': u''}, {'CMS_MEDIA_URL':
'/media/cms/'}, {'MEDIA_URL': '/media/'}, {'request': <WSGIRequest
GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'sessionid':
'b9b6ebfa858a76b1fd69834371f62ea9'}, META:{'ALLUSERSPROFILE':
'C:\\ProgramData', 'APPDATA': 'C:\\Users\\michael\\AppData\\Roaming',
'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMPUTERNAME':
'MRHLAPTOP', 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',
'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'text/plain',
'DJANGO_SETTINGS_MODULE': 'redmule.settings', 'EDITOR': 'notepad.exe',
'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR':
'c:\\bin\\git', 'GOARCH': '386', 'GOOS': 'mingw', 'GOROOT':
'c:\\oss\\go', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\Users\\michael',
'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>}, {'debug': True, 'sql_queries':
[{'time': '0.000', 'sql': 'SELECT "django_session"."session_key",
"django_session"."session_data", "django_session"."expire_date" FROM
"django_session" WHERE ("django_session"."session_key" =
E\'b9b6ebfa858a76b1fd69834371f62ea9\' AND "django_session"."expire_date"
> E\'2010-02-05 21:29:41.908000\' )'}, {'time': '0.000', 'sql': 'SELECT
"auth_user"."id", "auth_user"."username", "auth_user"."first_name",
"auth_user"."last_name", "auth_user"."email", "auth_user"."password",
"auth_user"."is_staff", "auth_user"."is_active",
"auth_user"."is_superuser", "auth_user"."last_login",
"auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = 1
'}, {'time': '0.000', 'sql': 'SELECT "auth_message"."id",
"auth_message"."user_id", "auth_message"."message" FROM "auth_message"
WHERE "auth_message"."user_id" = 1 '}, {'time': '0.015', 'sql': 'SELECT
"wisdom_wisdom"."id", "wisdom_wisdom"."content",
"wisdom_wisdom"."attribution", "wisdom_wisdom"."link",
"wisdom_wisdom"."category", "wisdom_wisdom"."updated" FROM
"wisdom_wisdom"'}, {'time': '0.000', 'sql': 'SELECT
"advocacy_advocacy"."id", "advocacy_advocacy"."comment",
"advocacy_advocacy"."href", "advocacy_advocacy"."link",
"advocacy_advocacy"."graphic", "advocacy_advocacy"."updated" FROM
"advocacy_advocacy"'}, {'time': '0.000', 'sql': 'SELECT
"django_site"."id", "django_site"."domain", "django_site"."name" FROM
"django_site" WHERE "django_site"."id" = 1 ORDER BY
"django_site"."domain" ASC'}]}, {'perms':
<django.core.context_processors.PermWrapper object at 0x02C4F8F0>,
'messages': [], 'user': <User: michael>}, {}]}
* c:\oss\django\django\template\loader.py in render_to_string
94. Loads the given template_name and renders it with the given
dictionary as
95. context. The template_name may be a string to load a single
template using
96. get_template, or it may be a tuple to use select_template
to find one of
97. the templates in the list. Returns a string.
98. """
99. dictionary = dictionary or {}
100. if isinstance(template_name, (list, tuple)):
101. t = select_template(template_name) ...
102. else:
103. t = get_template(template_name)
104. if context_instance:
105. context_instance.update(dictionary)
106. else:
107. context_instance = Context(dictionary)
▶ Local vars
Variable Value
context_instance
[{'advocacy_comment': u'Python is the most imminently
<i>useful</i> programming language available. From extensive libraries
to platform portability and a powerful but stunningly simple syntax it
is set apart from all competitors.', 'advocacy_href': u'<a
href="http://www.python.org">\r\n <img border="0" alt="Program with
Python!" title="Program with Python!"
src="http://python.org/community/logos/python-logo.png"/>\r\n </a>',
'advocacy_link': u'', 'advocacy_graphic': <ImageFieldFile: None>},
{'wisdom_attribution': u'1 Corinthians 1:27', 'wisdom_text': u'But God
hath chosen the foolish things of the world to confound the wise; and
God hath chosen the weak things of the world to confound the things
which are mighty;', 'wisdom_link': u''}, {'CMS_MEDIA_URL':
'/media/cms/'}, {'MEDIA_URL': '/media/'}, {'request': <WSGIRequest
GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'sessionid':
'b9b6ebfa858a76b1fd69834371f62ea9'}, META:{'ALLUSERSPROFILE':
'C:\\ProgramData', 'APPDATA': 'C:\\Users\\michael\\AppData\\Roaming',
'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMPUTERNAME':
'MRHLAPTOP', 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',
'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'text/plain',
'DJANGO_SETTINGS_MODULE': 'redmule.settings', 'EDITOR': 'notepad.exe',
'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GITDIR':
'c:\\bin\\git', 'GOARCH': '386', 'GOOS': 'mingw', 'GOROOT':
'c:\\oss\\go', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\Users\\michael',
'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9', 'HTTP_HOST':
'localhost:8000', 'HTTP_KEEP_ALIVE': '115', 'HTTP_REFERER':
'http://localhost:8000/admin/blog/post/', 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6', 'LOCALAPPDATA':
'C:\\Users\\michael\\AppData\\Local', 'LOGONSERVER': '\\\\MRHLAPTOP',
'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH':
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py',
'PATH_INFO': u'/admin/blog/post/add/', 'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 22 Stepping 1,
GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '1601',
'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files',
'PROMPT': '$P$G', 'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC':
'C:\\Users\\Public', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1',
'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true',
'SCRIPT_NAME': u'', 'SERVER_NAME': 'mrhlaptop', 'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1
Python/2.6.3', 'SESSIONNAME': 'Console', 'SVN_SSH':
'c:/pgms/putty/plink.exe -P 40022', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT':
'C:\\Windows', 'TEMP': 'C:\\Users\\michael\\AppData\\Local\\Temp',
'TMP': 'C:\\Users\\michael\\AppData\\Local\\Temp', 'USERDOMAIN':
'mrhlaptop', 'USERNAME': 'michael', 'USERPROFILE': 'C:\\Users\\michael',
'WINDIR': 'C:\\Windows', 'wsgi.errors': <open file '<stderr>', mode 'w'
at 0x013140C0>, 'wsgi.file_wrapper': <class
'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input':
<socket._fileobject object at 0x02D3ACB0>, 'wsgi.multiprocess': False,
'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme':
'http', 'wsgi.version': (1, 0)}>}, {'debug': True, 'sql_queries':
[{'time': '0.000', 'sql': 'SELECT "django_session"."session_key",
"django_session"."session_data", "django_session"."expire_date" FROM
"django_session" WHERE ("django_session"."session_key" =
E\'b9b6ebfa858a76b1fd69834371f62ea9\' AND "django_session"."expire_date"
> E\'2010-02-05 21:29:41.908000\' )'}, {'time': '0.000', 'sql': 'SELECT
"auth_user"."id", "auth_user"."username", "auth_user"."first_name",
"auth_user"."last_name", "auth_user"."email", "auth_user"."password",
"auth_user"."is_staff", "auth_user"."is_active",
"auth_user"."is_superuser", "auth_user"."last_login",
"auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = 1
'}, {'time': '0.000', 'sql': 'SELECT "auth_message"."id",
"auth_message"."user_id", "auth_message"."message" FROM "auth_message"
WHERE "auth_message"."user_id" = 1 '}, {'time': '0.015', 'sql': 'SELECT
"wisdom_wisdom"."id", "wisdom_wisdom"."content",
"wisdom_wisdom"."attribution", "wisdom_wisdom"."link",
"wisdom_wisdom"."category", "wisdom_wisdom"."updated" FROM
"wisdom_wisdom"'}, {'time': '0.000', 'sql': 'SELECT
"advocacy_advocacy"."id", "advocacy_advocacy"."comment",
"advocacy_advocacy"."href", "advocacy_advocacy"."link",
"advocacy_advocacy"."graphic", "advocacy_advocacy"."updated" FROM
"advocacy_advocacy"'}, {'time': '0.000', 'sql': 'SELECT
"django_site"."id", "django_site"."domain", "django_site"."name" FROM
"django_site" WHERE "django_site"."id" = 1 ORDER BY
"django_site"."domain" ASC'}]}, {'perms':
<django.core.context_processors.PermWrapper object at 0x02C4F8F0>,
'messages': [], 'user': <User: michael>}, {}]
dictionary
{'active_editor': 2, 'add': True, 'adminform':
<django.contrib.admin.helpers.AdminForm object at 0x02C3FB90>,
'app_label': 'blog', 'change': False, 'content_type_id': 37, 'errors':
[], 'form_url': '', 'has_absolute_url': True, 'has_add_permission':
True, 'has_change_permission': True, 'has_delete_permission': True,
'has_file_field': True, 'inline_admin_formsets': [], 'is_popup': False,
'media': '<script type="text/javascript"
src="/media/admin/js/core.js"></script>\n<script type="text/javascript"
src="/media/admin/js/admin/RelatedObjectLookups.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/getElementsBySelector.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/actions.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/urlify.js"></script>\n<script
type="text/javascript"
src="/media/js/tiny_mce/tiny_mce.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/calendar.js"></script>\n<script
type="text/javascript"
src="/media/admin/js/admin/DateTimeShortcuts.js"></script>', 'opts':
<Options for Post>, 'ordered_objects': [], 'root_path': '/admin/',
'save_as': False, 'save_on_top': False, 'show_delete': False, 'title':
u'Add post'}
template_name
['admin/blog/post/change_form.html',
'admin/blog/change_form.html', 'admin/change_form.html']
* c:\oss\django\django\template\loader.py in select_template
107. context_instance = Context(dictionary)
108. return t.render(context_instance)
109.
110. def select_template(template_name_list):
111. "Given a list of template names, returns the first that can
be loaded."
112. for template_name in template_name_list:
113. try:
114. return get_template(template_name) ...
115. except TemplateDoesNotExist:
116. continue
117. # If we get here, none of the templates could be loaded
118. raise TemplateDoesNotExist, ', '.join(template_name_list)
119.
120. add_to_builtins('django.template.loader_tags')
▶ Local vars
Variable Value
template_name
'admin/blog/post/change_form.html'
template_name_list
['admin/blog/post/change_form.html',
'admin/blog/change_form.html', 'admin/change_form.html']
* c:\oss\django\django\template\loader.py in get_template
75.
76. def get_template(template_name):
77. """
78. Returns a compiled Template object for the given template name,
79. handling template inheritance recursively.
80. """
81. source, origin = find_template_source(template_name)
82. template = get_template_from_string(source, origin,
template_name) ...
83. return template
84.
85. def get_template_from_string(source, origin=None, name=None):
86. """
87. Returns a compiled Template object for the given template code,
88. handling template inheritance recursively.
▶ Local vars
Variable Value
origin
<django.template.loader.LoaderOrigin object at 0x02C6D530>
source
u'{% extends "admin/change_form.html" %}\n\n{% block extrahead
%}\n {% load adminmedia inlines %}\n {{ block.super }}\n\n\t<script
type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>\n\n
<script type="text/javascript">\n function InlineInit() {\n var body_div
= document.getElementById(\'id_body\').parentNode;\n var content =
\'\'\n content += \'{% get_inline_types as inline_list %}\'\n content +=
\'<label>Body inlines:</label>\'\n \n content += \'<strong>Inline
type:</strong> \'\n content += \'<select id="id_inline_content_type"
onchange="document.getElementById(\\\'lookup_id_inline\\\').href =
\\\'../../../\\\'+this.value+\\\'/\\\';" style="margin-right:20px;">\'\n
content += \' <option>----------</option>\'\n content += \' {% for
inline in inline_list %}\'\n content += \' <option value="{{
inline.content_type.app_label }}/{{ inline.content_type.model }}">{{
inline.content_type.app_label|capfirst }}: {{
inline.content_type.model|capfirst }}</option>\'\n content += \' {%
endfor %}\'\n content += \'</select> \'\n \n content +=
\'<strong>Object:</strong> \'\n content += \'<input type="text"
class="vIntegerField" id="id_inline" size="10" /> \'\n content += \'<a
id="lookup_id_inline" href="#" class="related-lookup"
onclick="if(document.getElementById(\\\'id_inline_content_type\\\').value !=
\\\'----------\\\') { return showRelatedObjectLookupPopup(this); }"
style="margin-right:20px;"><img src="{% admin_media_prefix
%}img/admin/selector-search.gif" width="16" height="16" alt="Loopup"
/></a> \'\n \n content += \'<strong>Class:</strong> \'\n content +=
\'<select id="id_inline_class">\'\n content += \' <option
value="small_left">Small left</option>\'\n content += \' <option
value="small_right">Small right</option>\'\n content += \' <option
value="medium_left">Medium left</option>\'\n content += \' <option
value="medium_right">Medium right</option>\'\n content += \' <option
value="large_left">Large left</option>\'\n content += \' <option
value="large_right">Large right</option>\'\n content += \' <option
value="full">Full</option>\'\n content += \'</select>\'\n \n content +=
\'<input type="button" value="Add" style="margin-left:10px;"
onclick="return
insertInline(document.getElementById(\\\'id_inline_content_type\\\').value,
document.getElementById(\\\'id_inline\\\').value,
document.getElementById(\\\'id_inline_class\\\').value)" />\'\n content
+= \'<p class="help">Insert inlines into your body by choosing an inline
type, then an object, then a class.</p>\'\n \n var div =
document.createElement(\'div\');\n div.setAttribute(\'style\',
\'margin-top:10px;\');\n div.innerHTML = content;\n
body_div.insertBefore(div,
document.getElementById(\'id_body\').nextSibling);\n\n }\n \n function
insertInline(type, id, classname) {\n if (type != \'----------\' && id
!= \'\') {\n inline = \'<inline type="\'+type.replace(\'/\', \'.\')+\'"
id="\'+id+\'" class="\'+classname+\'" />\';\n body =
document.getElementById(\'id_body\');\n body.value = body.value + inline
+ \'\\n\';\n }\n }\n\n\tfunction
hideMarkup(){\n\t\t$(\'.markup\').hide()\n\t}\n \n {% ifequal
active_editor 1 %}\n\n\t$(document).ready(function
(){\n\t\tInlineInit()\n\t});\t\t\n\t\t\n\t$(document).ready(function
(){\n\t\tif($(\'#id_markup\').val() ==
\'restructuredtext\')\n\t\t{\n\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t}\n\t});\n\t\t\n\t$(document).ready(function
() {\n\t\t$(\'#id_markup\').change(function() {\n\t\t\tif($(this).val()
==
\'restructuredtext\')\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').show();\n\t\t\t}\n\t\t});\n\t});\n\t\t\n
{% endifequal %}\n\n {% ifequal active_editor 2
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n {% ifequal active_editor 3
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n </script>\n{% endblock %}\n\n\n{% block footer
%}\n{% ifequal active_editor 3 %}\n{% load wysiwyg %}\n{% wysiwyg_setup
%}\n{% wysiwyg_editor "id_body" %}\n{% endifequal %}\n<div
id="footer"></div>\n{% endblock %}\n'
template_name
'admin/blog/post/change_form.html'
* c:\oss\django\django\template\loader.py in get_template_from_string
83. return template
84.
85. def get_template_from_string(source, origin=None, name=None):
86. """
87. Returns a compiled Template object for the given template code,
88. handling template inheritance recursively.
89. """
90. return Template(source, origin, name) ...
91.
92. def render_to_string(template_name, dictionary=None,
context_instance=None):
93. """
94. Loads the given template_name and renders it with the given
dictionary as
95. context. The template_name may be a string to load a single
template using
96. get_template, or it may be a tuple to use select_template
to find one of
▶ Local vars
Variable Value
name
'admin/blog/post/change_form.html'
origin
<django.template.loader.LoaderOrigin object at 0x02C6D530>
source
u'{% extends "admin/change_form.html" %}\n\n{% block extrahead
%}\n {% load adminmedia inlines %}\n {{ block.super }}\n\n\t<script
type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>\n\n
<script type="text/javascript">\n function InlineInit() {\n var body_div
= document.getElementById(\'id_body\').parentNode;\n var content =
\'\'\n content += \'{% get_inline_types as inline_list %}\'\n content +=
\'<label>Body inlines:</label>\'\n \n content += \'<strong>Inline
type:</strong> \'\n content += \'<select id="id_inline_content_type"
onchange="document.getElementById(\\\'lookup_id_inline\\\').href =
\\\'../../../\\\'+this.value+\\\'/\\\';" style="margin-right:20px;">\'\n
content += \' <option>----------</option>\'\n content += \' {% for
inline in inline_list %}\'\n content += \' <option value="{{
inline.content_type.app_label }}/{{ inline.content_type.model }}">{{
inline.content_type.app_label|capfirst }}: {{
inline.content_type.model|capfirst }}</option>\'\n content += \' {%
endfor %}\'\n content += \'</select> \'\n \n content +=
\'<strong>Object:</strong> \'\n content += \'<input type="text"
class="vIntegerField" id="id_inline" size="10" /> \'\n content += \'<a
id="lookup_id_inline" href="#" class="related-lookup"
onclick="if(document.getElementById(\\\'id_inline_content_type\\\').value !=
\\\'----------\\\') { return showRelatedObjectLookupPopup(this); }"
style="margin-right:20px;"><img src="{% admin_media_prefix
%}img/admin/selector-search.gif" width="16" height="16" alt="Loopup"
/></a> \'\n \n content += \'<strong>Class:</strong> \'\n content +=
\'<select id="id_inline_class">\'\n content += \' <option
value="small_left">Small left</option>\'\n content += \' <option
value="small_right">Small right</option>\'\n content += \' <option
value="medium_left">Medium left</option>\'\n content += \' <option
value="medium_right">Medium right</option>\'\n content += \' <option
value="large_left">Large left</option>\'\n content += \' <option
value="large_right">Large right</option>\'\n content += \' <option
value="full">Full</option>\'\n content += \'</select>\'\n \n content +=
\'<input type="button" value="Add" style="margin-left:10px;"
onclick="return
insertInline(document.getElementById(\\\'id_inline_content_type\\\').value,
document.getElementById(\\\'id_inline\\\').value,
document.getElementById(\\\'id_inline_class\\\').value)" />\'\n content
+= \'<p class="help">Insert inlines into your body by choosing an inline
type, then an object, then a class.</p>\'\n \n var div =
document.createElement(\'div\');\n div.setAttribute(\'style\',
\'margin-top:10px;\');\n div.innerHTML = content;\n
body_div.insertBefore(div,
document.getElementById(\'id_body\').nextSibling);\n\n }\n \n function
insertInline(type, id, classname) {\n if (type != \'----------\' && id
!= \'\') {\n inline = \'<inline type="\'+type.replace(\'/\', \'.\')+\'"
id="\'+id+\'" class="\'+classname+\'" />\';\n body =
document.getElementById(\'id_body\');\n body.value = body.value + inline
+ \'\\n\';\n }\n }\n\n\tfunction
hideMarkup(){\n\t\t$(\'.markup\').hide()\n\t}\n \n {% ifequal
active_editor 1 %}\n\n\t$(document).ready(function
(){\n\t\tInlineInit()\n\t});\t\t\n\t\t\n\t$(document).ready(function
(){\n\t\tif($(\'#id_markup\').val() ==
\'restructuredtext\')\n\t\t{\n\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t}\n\t});\n\t\t\n\t$(document).ready(function
() {\n\t\t$(\'#id_markup\').change(function() {\n\t\t\tif($(this).val()
==
\'restructuredtext\')\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').show();\n\t\t\t}\n\t\t});\n\t});\n\t\t\n
{% endifequal %}\n\n {% ifequal active_editor 2
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n {% ifequal active_editor 3
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n </script>\n{% endblock %}\n\n\n{% block footer
%}\n{% ifequal active_editor 3 %}\n{% load wysiwyg %}\n{% wysiwyg_setup
%}\n{% wysiwyg_editor "id_body" %}\n{% endifequal %}\n<div
id="footer"></div>\n{% endblock %}\n'
* c:\oss\django\django\template\__init__.py in __init__
161. def __init__(self, template_string, origin=None,
name='<Unknown Template>'):
162. try:
163. template_string = smart_unicode(template_string)
164. except UnicodeDecodeError:
165. raise TemplateEncodingError("Templates can only be
constructed from unicode or UTF-8 strings.")
166. if settings.TEMPLATE_DEBUG and origin is None:
167. origin = StringOrigin(template_string)
168. self.nodelist = compile_string(template_string, origin) ...
169. self.name = name
170.
171. def __iter__(self):
172. for node in self.nodelist:
173. for subnode in node:
174. yield subnode
▶ Local vars
Variable Value
name
'admin/blog/post/change_form.html'
origin
<django.template.loader.LoaderOrigin object at 0x02C6D530>
self
<django.template.Template object at 0x02C6D6F0>
template_string
u'{% extends "admin/change_form.html" %}\n\n{% block extrahead
%}\n {% load adminmedia inlines %}\n {{ block.super }}\n\n\t<script
type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>\n\n
<script type="text/javascript">\n function InlineInit() {\n var body_div
= document.getElementById(\'id_body\').parentNode;\n var content =
\'\'\n content += \'{% get_inline_types as inline_list %}\'\n content +=
\'<label>Body inlines:</label>\'\n \n content += \'<strong>Inline
type:</strong> \'\n content += \'<select id="id_inline_content_type"
onchange="document.getElementById(\\\'lookup_id_inline\\\').href =
\\\'../../../\\\'+this.value+\\\'/\\\';" style="margin-right:20px;">\'\n
content += \' <option>----------</option>\'\n content += \' {% for
inline in inline_list %}\'\n content += \' <option value="{{
inline.content_type.app_label }}/{{ inline.content_type.model }}">{{
inline.content_type.app_label|capfirst }}: {{
inline.content_type.model|capfirst }}</option>\'\n content += \' {%
endfor %}\'\n content += \'</select> \'\n \n content +=
\'<strong>Object:</strong> \'\n content += \'<input type="text"
class="vIntegerField" id="id_inline" size="10" /> \'\n content += \'<a
id="lookup_id_inline" href="#" class="related-lookup"
onclick="if(document.getElementById(\\\'id_inline_content_type\\\').value !=
\\\'----------\\\') { return showRelatedObjectLookupPopup(this); }"
style="margin-right:20px;"><img src="{% admin_media_prefix
%}img/admin/selector-search.gif" width="16" height="16" alt="Loopup"
/></a> \'\n \n content += \'<strong>Class:</strong> \'\n content +=
\'<select id="id_inline_class">\'\n content += \' <option
value="small_left">Small left</option>\'\n content += \' <option
value="small_right">Small right</option>\'\n content += \' <option
value="medium_left">Medium left</option>\'\n content += \' <option
value="medium_right">Medium right</option>\'\n content += \' <option
value="large_left">Large left</option>\'\n content += \' <option
value="large_right">Large right</option>\'\n content += \' <option
value="full">Full</option>\'\n content += \'</select>\'\n \n content +=
\'<input type="button" value="Add" style="margin-left:10px;"
onclick="return
insertInline(document.getElementById(\\\'id_inline_content_type\\\').value,
document.getElementById(\\\'id_inline\\\').value,
document.getElementById(\\\'id_inline_class\\\').value)" />\'\n content
+= \'<p class="help">Insert inlines into your body by choosing an inline
type, then an object, then a class.</p>\'\n \n var div =
document.createElement(\'div\');\n div.setAttribute(\'style\',
\'margin-top:10px;\');\n div.innerHTML = content;\n
body_div.insertBefore(div,
document.getElementById(\'id_body\').nextSibling);\n\n }\n \n function
insertInline(type, id, classname) {\n if (type != \'----------\' && id
!= \'\') {\n inline = \'<inline type="\'+type.replace(\'/\', \'.\')+\'"
id="\'+id+\'" class="\'+classname+\'" />\';\n body =
document.getElementById(\'id_body\');\n body.value = body.value + inline
+ \'\\n\';\n }\n }\n\n\tfunction
hideMarkup(){\n\t\t$(\'.markup\').hide()\n\t}\n \n {% ifequal
active_editor 1 %}\n\n\t$(document).ready(function
(){\n\t\tInlineInit()\n\t});\t\t\n\t\t\n\t$(document).ready(function
(){\n\t\tif($(\'#id_markup\').val() ==
\'restructuredtext\')\n\t\t{\n\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t}\n\t});\n\t\t\n\t$(document).ready(function
() {\n\t\t$(\'#id_markup\').change(function() {\n\t\t\tif($(this).val()
==
\'restructuredtext\')\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').show();\n\t\t\t}\n\t\t});\n\t});\n\t\t\n
{% endifequal %}\n\n {% ifequal active_editor 2
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n {% ifequal active_editor 3
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n </script>\n{% endblock %}\n\n\n{% block footer
%}\n{% ifequal active_editor 3 %}\n{% load wysiwyg %}\n{% wysiwyg_setup
%}\n{% wysiwyg_editor "id_body" %}\n{% endifequal %}\n<div
id="footer"></div>\n{% endblock %}\n'
* c:\oss\django\django\template\__init__.py in compile_string
182. if settings.TEMPLATE_DEBUG:
183. from debug import DebugLexer, DebugParser
184. lexer_class, parser_class = DebugLexer, DebugParser
185. else:
186. lexer_class, parser_class = Lexer, Parser
187. lexer = lexer_class(template_string, origin)
188. parser = parser_class(lexer.tokenize())
189. return parser.parse() ...
190.
191. class Token(object):
192. def __init__(self, token_type, contents):
193. # token_type must be TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK or
TOKEN_COMMENT.
194. self.token_type, self.contents = token_type, contents
195.
▶ Local vars
Variable Value
DebugLexer
<class 'django.template.debug.DebugLexer'>
DebugParser
<class 'django.template.debug.DebugParser'>
lexer
<django.template.debug.DebugLexer object at 0x02C6DDB0>
lexer_class
<class 'django.template.debug.DebugLexer'>
origin
<django.template.loader.LoaderOrigin object at 0x02C6D530>
parser
<django.template.debug.DebugParser object at 0x02C6D0F0>
parser_class
<class 'django.template.debug.DebugParser'>
template_string
u'{% extends "admin/change_form.html" %}\n\n{% block extrahead
%}\n {% load adminmedia inlines %}\n {{ block.super }}\n\n\t<script
type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>\n\n
<script type="text/javascript">\n function InlineInit() {\n var body_div
= document.getElementById(\'id_body\').parentNode;\n var content =
\'\'\n content += \'{% get_inline_types as inline_list %}\'\n content +=
\'<label>Body inlines:</label>\'\n \n content += \'<strong>Inline
type:</strong> \'\n content += \'<select id="id_inline_content_type"
onchange="document.getElementById(\\\'lookup_id_inline\\\').href =
\\\'../../../\\\'+this.value+\\\'/\\\';" style="margin-right:20px;">\'\n
content += \' <option>----------</option>\'\n content += \' {% for
inline in inline_list %}\'\n content += \' <option value="{{
inline.content_type.app_label }}/{{ inline.content_type.model }}">{{
inline.content_type.app_label|capfirst }}: {{
inline.content_type.model|capfirst }}</option>\'\n content += \' {%
endfor %}\'\n content += \'</select> \'\n \n content +=
\'<strong>Object:</strong> \'\n content += \'<input type="text"
class="vIntegerField" id="id_inline" size="10" /> \'\n content += \'<a
id="lookup_id_inline" href="#" class="related-lookup"
onclick="if(document.getElementById(\\\'id_inline_content_type\\\').value !=
\\\'----------\\\') { return showRelatedObjectLookupPopup(this); }"
style="margin-right:20px;"><img src="{% admin_media_prefix
%}img/admin/selector-search.gif" width="16" height="16" alt="Loopup"
/></a> \'\n \n content += \'<strong>Class:</strong> \'\n content +=
\'<select id="id_inline_class">\'\n content += \' <option
value="small_left">Small left</option>\'\n content += \' <option
value="small_right">Small right</option>\'\n content += \' <option
value="medium_left">Medium left</option>\'\n content += \' <option
value="medium_right">Medium right</option>\'\n content += \' <option
value="large_left">Large left</option>\'\n content += \' <option
value="large_right">Large right</option>\'\n content += \' <option
value="full">Full</option>\'\n content += \'</select>\'\n \n content +=
\'<input type="button" value="Add" style="margin-left:10px;"
onclick="return
insertInline(document.getElementById(\\\'id_inline_content_type\\\').value,
document.getElementById(\\\'id_inline\\\').value,
document.getElementById(\\\'id_inline_class\\\').value)" />\'\n content
+= \'<p class="help">Insert inlines into your body by choosing an inline
type, then an object, then a class.</p>\'\n \n var div =
document.createElement(\'div\');\n div.setAttribute(\'style\',
\'margin-top:10px;\');\n div.innerHTML = content;\n
body_div.insertBefore(div,
document.getElementById(\'id_body\').nextSibling);\n\n }\n \n function
insertInline(type, id, classname) {\n if (type != \'----------\' && id
!= \'\') {\n inline = \'<inline type="\'+type.replace(\'/\', \'.\')+\'"
id="\'+id+\'" class="\'+classname+\'" />\';\n body =
document.getElementById(\'id_body\');\n body.value = body.value + inline
+ \'\\n\';\n }\n }\n\n\tfunction
hideMarkup(){\n\t\t$(\'.markup\').hide()\n\t}\n \n {% ifequal
active_editor 1 %}\n\n\t$(document).ready(function
(){\n\t\tInlineInit()\n\t});\t\t\n\t\t\n\t$(document).ready(function
(){\n\t\tif($(\'#id_markup\').val() ==
\'restructuredtext\')\n\t\t{\n\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t}\n\t});\n\t\t\n\t$(document).ready(function
() {\n\t\t$(\'#id_markup\').change(function() {\n\t\t\tif($(this).val()
==
\'restructuredtext\')\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').hide();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$(\'#id_body\').next(\'div\').show();\n\t\t\t}\n\t\t});\n\t});\n\t\t\n
{% endifequal %}\n\n {% ifequal active_editor 2
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n {% ifequal active_editor 3
%}\n\t\t$(document).ready(function () {\n\t\t\thideMarkup();\n\t\t});\n
{% endifequal %}\n\n </script>\n{% endblock %}\n\n\n{% block footer
%}\n{% ifequal active_editor 3 %}\n{% load wysiwyg %}\n{% wysiwyg_setup
%}\n{% wysiwyg_editor "id_body" %}\n{% endifequal %}\n<div
id="footer"></div>\n{% endblock %}\n'
* c:\oss\django\django\template\__init__.py in parse
278. # execute callback function for this tag and append
resulting node
279. self.enter_command(command, token)
280. try:
281. compile_func = self.tags[command]
282. except KeyError:
283. self.invalid_block_tag(token, command)
284. try:
285. compiled_result = compile_func(self, token) ...
286. except TemplateSyntaxError, e:
287. if not self.compile_function_error(token, e):
288. raise
289. self.extend_nodelist(nodelist, compiled_result, token)
290. self.exit_command()
291. if parse_until:
▶ Local vars
Variable Value
command
u'extends'
compile_func
<function do_extends at 0x027671F0>
e
TemplateSyntaxError(u"'wysiwyg' is not a valid tag library: Could
not load template library from django.templatetags.wysiwyg, No module
named wysiwyg",)
nodelist
[]
parse_until
[]
self
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DF50>
* c:\oss\django\django\template\loader_tags.py in do_extends
162. if len(bits) != 2:
163. raise TemplateSyntaxError, "'%s' takes one argument" % bits[0]
164. parent_name, parent_name_expr = None, None
165. if bits[1][0] in ('"', "'") and bits[1][-1] == bits[1][0]:
166. parent_name = bits[1][1:-1]
167. else:
168. parent_name_expr = parser.compile_filter(bits[1])
169. nodelist = parser.parse() ...
170. if nodelist.get_nodes_by_type(ExtendsNode):
171. raise TemplateSyntaxError, "'%s' cannot appear more than
once in the same template" % bits[0]
172. return ExtendsNode(nodelist, parent_name, parent_name_expr)
173.
174. def do_include(parser, token):
175. """
▶ Local vars
Variable Value
bits
[u'extends', u'"admin/change_form.html"']
parent_name
u'admin/change_form.html'
parent_name_expr
None
parser
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DF50>
* c:\oss\django\django\template\__init__.py in parse
278. # execute callback function for this tag and append
resulting node
279. self.enter_command(command, token)
280. try:
281. compile_func = self.tags[command]
282. except KeyError:
283. self.invalid_block_tag(token, command)
284. try:
285. compiled_result = compile_func(self, token) ...
286. except TemplateSyntaxError, e:
287. if not self.compile_function_error(token, e):
288. raise
289. self.extend_nodelist(nodelist, compiled_result, token)
290. self.exit_command()
291. if parse_until:
▶ Local vars
Variable Value
command
u'block'
compile_func
<function do_block at 0x02761E30>
compiled_result
<Block Node: extrahead. Contents: [<Text Node: ' '>,
<django.template.defaulttags.LoadNode object at 0x02C6D3F0>, <Text Node:
' '>, <Variable Node: block.super>, <Text Node: ' <script
type="text/jav'>, <django.templatetags.inlines.InlineTypes object at
0x02C6D190>, <Text Node: '' content += '<labe'>, <For Node: for inline
in inline_list, tail_len: 9>, <Text Node: '' content += '</sel'>,
<django.template.SimpleNode object at 0x02C6D550>, <Text Node:
'img/admin/selector-search'>, <IfEqualNode>, <Text Node: ' '>,
<IfEqualNode>, <Text Node: ' '>, <IfEqualNode>, <Text Node: ' </script> '>]>
e
TemplateSyntaxError(u"'wysiwyg' is not a valid tag library: Could
not load template library from django.templatetags.wysiwyg, No module
named wysiwyg",)
nodelist
[<Text Node: ' '>, <Block Node: extrahead. Contents: [<Text Node:
' '>, <django.template.defaulttags.LoadNode object at 0x02C6D3F0>, <Text
Node: ' '>, <Variable Node: block.super>, <Text Node: ' <script
type="text/jav'>, <django.templatetags.inlines.InlineTypes object at
0x02C6D190>, <Text Node: '' content += '<labe'>, <For Node: for inline
in inline_list, tail_len: 9>, <Text Node: '' content += '</sel'>,
<django.template.SimpleNode object at 0x02C6D550>, <Text Node:
'img/admin/selector-search'>, <IfEqualNode>, <Text Node: ' '>,
<IfEqualNode>, <Text Node: ' '>, <IfEqualNode>, <Text Node: ' </script>
'>]>, <Text Node: ' '>]
parse_until
[]
self
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DE70>
* c:\oss\django\django\template\loader_tags.py in do_block
140. # check for duplication.
141. try:
142. if block_name in parser.__loaded_blocks:
143. raise TemplateSyntaxError, "'%s' tag with name '%s' appears
more than once" % (bits[0], block_name)
144. parser.__loaded_blocks.append(block_name)
145. except AttributeError: # parser.__loaded_blocks isn't a
list yet
146. parser.__loaded_blocks = [block_name]
147. nodelist = parser.parse(('endblock', 'endblock %s' %
block_name)) ...
148. parser.delete_first_token()
149. return BlockNode(block_name, nodelist)
150.
151. def do_extends(parser, token):
152. """
153. Signal that this template extends a parent template.
▶ Local vars
Variable Value
bits
[u'block', u'footer']
block_name
u'footer'
parser
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DE70>
* c:\oss\django\django\template\__init__.py in parse
278. # execute callback function for this tag and append
resulting node
279. self.enter_command(command, token)
280. try:
281. compile_func = self.tags[command]
282. except KeyError:
283. self.invalid_block_tag(token, command)
284. try:
285. compiled_result = compile_func(self, token) ...
286. except TemplateSyntaxError, e:
287. if not self.compile_function_error(token, e):
288. raise
289. self.extend_nodelist(nodelist, compiled_result, token)
290. self.exit_command()
291. if parse_until:
▶ Local vars
Variable Value
command
u'ifequal'
compile_func
<function ifequal at 0x0272FDF0>
e
TemplateSyntaxError(u"'wysiwyg' is not a valid tag library: Could
not load template library from django.templatetags.wysiwyg, No module
named wysiwyg",)
nodelist
[<Text Node: ' '>]
parse_until
('endblock', u'endblock footer')
self
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DED0>
* c:\oss\django\django\template\defaulttags.py in ifequal
724.
725. {% ifnotequal user.id comment.user_id %}
726. ...
727. {% else %}
728. ...
729. {% endifnotequal %}
730. """
731. return do_ifequal(parser, token, False) ...
732. ifequal = register.tag(ifequal)
733.
734. #@register.tag
735. def ifnotequal(parser, token):
736. """
737. Outputs the contents of the block if the two arguments are
not equal.
▶ Local vars
Variable Value
parser
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DED0>
* c:\oss\django\django\template\defaulttags.py in do_ifequal
696. do_for = register.tag("for", do_for)
697.
698. def do_ifequal(parser, token, negate):
699. bits = list(token.split_contents())
700. if len(bits) != 3:
701. raise TemplateSyntaxError, "%r takes two arguments" % bits[0]
702. end_tag = 'end' + bits[0]
703. nodelist_true = parser.parse(('else', end_tag)) ...
704. token = parser.next_token()
705. if token.contents == 'else':
706. nodelist_false = parser.parse((end_tag,))
707. parser.delete_first_token()
708. else:
709. nodelist_false = NodeList()
▶ Local vars
Variable Value
bits
[u'ifequal', u'active_editor', u'3']
end_tag
u'endifequal'
negate
False
parser
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DED0>
* c:\oss\django\django\template\__init__.py in parse
278. # execute callback function for this tag and append
resulting node
279. self.enter_command(command, token)
280. try:
281. compile_func = self.tags[command]
282. except KeyError:
283. self.invalid_block_tag(token, command)
284. try:
285. compiled_result = compile_func(self, token) ...
286. except TemplateSyntaxError, e:
287. if not self.compile_function_error(token, e):
288. raise
289. self.extend_nodelist(nodelist, compiled_result, token)
290. self.exit_command()
291. if parse_until:
▶ Local vars
Variable Value
command
u'load'
compile_func
<function load at 0x0272FF30>
e
TemplateSyntaxError(u"'wysiwyg' is not a valid tag library: Could
not load template library from django.templatetags.wysiwyg, No module
named wysiwyg",)
nodelist
[<Text Node: ' '>]
parse_until
('else', u'endifequal')
self
<django.template.debug.DebugParser object at 0x02C6D0F0>
token
<django.template.Token object at 0x02C6DD90>
* c:\oss\django\django\template\defaulttags.py in load
920. for taglib in bits[1:]:
921. # add the library to the parser
922. try:
923. lib = get_library("django.templatetags.%s" % taglib)
924. parser.add_library(lib)
925. except InvalidTemplateLibrary, e:
926. raise TemplateSyntaxError("'%s' is not a valid tag library:
%s" %
927. (taglib, e)) ...
928. return LoadNode()
929. load = register.tag(load)
930.
931. #@register.tag
932. def now(parser, token):
933. """
▶ Local vars
Variable Value
bits
[u'load', u'wysiwyg']
e
InvalidTemplateLibrary(u'Could not load template library from
django.templatetags.wysiwyg, No module named wysiwyg',)
parser
<django.template.debug.DebugParser object at 0x02C6D0F0>
taglib
u'wysiwyg'
token
<django.template.Token object at 0x02C6DD90>

Environment: Request Method: GET Request URL:
http://localhost:8000/admin/blog/post/add/ Django Version: 1.1.1 Python
Version: 2.6.3 Installed Applications: ['django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.sessions',
'django.contrib.admin', 'django.contrib.sites', 'cms', 'publisher',
'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.file',
'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.snippet',
'cms.plugins.googlemap', 'cms.plugins.teaser', 'cms.plugins.video',
'cms.plugins.twitter', 'cms.plugins.inherit', 'mptt', 'reversion',
'redmule.categories', 'south', 'redmule.sampleapp', 'redmule.timeapp',
'redmule.wisdom', 'redmule.advocacy', 'basic.blog', 'basic.inlines']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware') Template error: In template
c:\oss\basic\blog\templates\admin\blog\post\change_form.html, error at
line 107 'wysiwyg' is not a valid tag library: Could not load template
library from django.templatetags.wysiwyg, No module named wysiwyg 97 :
hideMarkup(); 98 : }); 99 : {% endifequal %} 100 : 101 : </script> 102 :
{% endblock %} 103 : 104 : 105 : {% block footer %} 106 : {% ifequal
active_editor 3 %} 107 : {% load wysiwyg %} 108 : {% wysiwyg_setup %}
109 : {% wysiwyg_editor "id_body" %} 110 : {% endifequal %} 111 : <div
id="footer"></div> 112 : {% endblock %} 113 : Traceback: File
"c:\oss\django\django\core\handlers\base.py" in get_response 92.
response = callback(request, *callback_args, **callback_kwargs) File
"c:\oss\django\django\contrib\admin\options.py" in wrapper 226. return
self.admin_site.admin_view(view)(*args, **kwargs) File
"c:\oss\django\django\views\decorators\cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs) File
"c:\oss\django\django\contrib\admin\sites.py" in inner 186. return
view(request, *args, **kwargs) File "c:\oss\basic\blog\admin.py" in
add_view 69. return super(PostAdmin, self).add_view(request, form_url,
extra_context) File "c:\oss\django\django\db\transaction.py" in
_commit_on_success 240. res = func(*args, **kw) File
"c:\oss\django\django\contrib\admin\options.py" in add_view 784. return
self.render_change_form(request, context, form_url=form_url, add=True)
File "c:\oss\django\django\contrib\admin\options.py" in
render_change_form 590. ], context, context_instance=context_instance)
File "c:\oss\django\django\shortcuts\__init__.py" in render_to_response
20. return HttpResponse(loader.render_to_string(*args, **kwargs),
**httpresponse_kwargs) File "c:\oss\django\django\template\loader.py" in
render_to_string 101. t = select_template(template_name) File
"c:\oss\django\django\template\loader.py" in select_template 114. return
get_template(template_name) File
"c:\oss\django\django\template\loader.py" in get_template 82. template =
get_template_from_string(source, origin, template_name) File
"c:\oss\django\django\template\loader.py" in get_template_from_string
90. return Template(source, origin, name) File
"c:\oss\django\django\template\__init__.py" in __init__ 168.
self.nodelist = compile_string(template_string, origin) File
"c:\oss\django\django\template\__init__.py" in compile_string 189.
return parser.parse() File "c:\oss\django\django\template\__init__.py"
in parse 285. compiled_result = compile_func(self, token) File
"c:\oss\django\django\template\loader_tags.py" in do_extends 169.
nodelist = parser.parse() File
"c:\oss\django\django\template\__init__.py" in parse 285.
compiled_result = compile_func(self, token) File
"c:\oss\django\django\template\loader_tags.py" in do_block 147. nodelist
= parser.parse(('endblock', 'endblock %s' % block_name)) File
"c:\oss\django\django\template\__init__.py" in parse 285.
compiled_result = compile_func(self, token) File
"c:\oss\django\django\template\defaulttags.py" in ifequal 731. return
do_ifequal(parser, token, False) File
"c:\oss\django\django\template\defaulttags.py" in do_ifequal 703.
nodelist_true = parser.parse(('else', end_tag)) File
"c:\oss\django\django\template\__init__.py" in parse 285.
compiled_result = compile_func(self, token) File
"c:\oss\django\django\template\defaulttags.py" in load 927. (taglib, e))
Exception Type: TemplateSyntaxError at /admin/blog/post/add/ Exception
Value: 'wysiwyg' is not a valid tag library: Could not load template
library from django.templatetags.wysiwyg, No module named wysiwyg

Request information
GET

No GET data
POST

No POST data
FILES

No FILES data
COOKIES
Variable Value
sessionid
'b9b6ebfa858a76b1fd69834371f62ea9'
META
Variable Value
ALLUSERSPROFILE
'C:\\ProgramData'
APPDATA
'C:\\Users\\michael\\AppData\\Roaming'
COMMONPROGRAMFILES
'C:\\Program Files\\Common Files'
COMPUTERNAME
'MRHLAPTOP'
COMSPEC
'C:\\Windows\\system32\\cmd.exe'
CONTENT_LENGTH
''
CONTENT_TYPE
'text/plain'
DJANGO_SETTINGS_MODULE
'redmule.settings'
EDITOR
'notepad.exe'
FP_NO_HOST_CHECK
'NO'
GATEWAY_INTERFACE
'CGI/1.1'
GITDIR
'c:\\bin\\git'
GOARCH
'386'
GOOS
'mingw'
GOROOT
'c:\\oss\\go'
HOMEDRIVE
'C:'
HOMEPATH
'\\Users\\michael'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_CHARSET
'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
HTTP_ACCEPT_ENCODING
'gzip,deflate'
HTTP_ACCEPT_LANGUAGE
'en-us,en;q=0.5'
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
'sessionid=b9b6ebfa858a76b1fd69834371f62ea9'
HTTP_HOST
'localhost:8000'
HTTP_KEEP_ALIVE
'115'
HTTP_REFERER
'http://localhost:8000/admin/blog/post/'
HTTP_USER_AGENT
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6'
LOCALAPPDATA
'C:\\Users\\michael\\AppData\\Local'
LOGONSERVER
'\\\\MRHLAPTOP'
NUMBER_OF_PROCESSORS
'1'
OS
'Windows_NT'
PATH
'C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\TortoiseSVN\\bin;C:\\Program Files\\Common
Files\\Intuit\\QBPOSSDKRuntime;C:\\Program
Files\\jEdit;.\\bin;c:\\bin;c:\\bin\\subversion\\bin;c:\\bin\\git\\cmd;c:\\bin\\unxutils\\usr\\local\\wbin;c:\\bin\\pstools;c:\\oss;c:\\oss\\django\\django\\bin;c:\\oss\\go\\bin;c:\\python26;c:\\pgms\\vim\\vim72;c:\\pgms\\putty;C:\\Program
Files\\OpenVPNTech\\bin;C:\\pgms\\Mercurial;C:\\Python26\\Scripts'
PATHEXT
'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.py'
PATH_INFO
u'/admin/blog/post/add/'
PROCESSOR_ARCHITECTURE
'x86'
PROCESSOR_IDENTIFIER
'x86 Family 6 Model 22 Stepping 1, GenuineIntel'
PROCESSOR_LEVEL
'6'
PROCESSOR_REVISION
'1601'
PROGRAMDATA
'C:\\ProgramData'
PROGRAMFILES
'C:\\Program Files'
PROMPT
'$P$G'
PSMODULEPATH
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\'
PUBLIC
'C:\\Users\\Public'
QUERY_STRING
''
REMOTE_ADDR
'127.0.0.1'
REMOTE_HOST
''
REQUEST_METHOD
'GET'
RUN_MAIN
'true'
SCRIPT_NAME
u''
SERVER_NAME
'mrhlaptop'
SERVER_PORT
'8000'
SERVER_PROTOCOL
'HTTP/1.1'
SERVER_SOFTWARE
'WSGIServer/0.1 Python/2.6.3'
SESSIONNAME
'Console'
SVN_SSH
'c:/pgms/putty/plink.exe -P 40022'
SYSTEMDRIVE
'C:'
SYSTEMROOT
'C:\\Windows'
TEMP
'C:\\Users\\michael\\AppData\\Local\\Temp'
TMP
'C:\\Users\\michael\\AppData\\Local\\Temp'
USERDOMAIN
'mrhlaptop'
USERNAME
'michael'
USERPROFILE
'C:\\Users\\michael'
WINDIR
'C:\\Windows'
wsgi.errors
<open file '<stderr>', mode 'w' at 0x013140C0>
wsgi.file_wrapper
<class 'django.core.servers.basehttp.FileWrapper'>
wsgi.input
<socket._fileobject object at 0x02D3ACB0>
wsgi.multiprocess
False
wsgi.multithread
True
wsgi.run_once
False
wsgi.url_scheme
'http'
wsgi.version
(1, 0)
Settings
Using settings module redmule.settings
Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
()
ADMIN_FOR
()
ADMIN_MEDIA_PREFIX
'/media/admin/'
ALLOWED_INCLUDE_ROOTS
()
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
BANNED_IPS
()
CACHE_BACKEND
'locmem:///'
CACHE_MIDDLEWARE_KEY_PREFIX
''
CACHE_MIDDLEWARE_SECONDS
600
CMS_APPLICATIONS_URLS
(('sampleapp.urls', 'Sample application'), ('sampleapp.urlstwo', 'Second
sample application'), ('timeapp.urls', 'Time application'))
CMS_CONTENT_CACHE_DURATION
60
CMS_DBGETTEXT
False
CMS_DBGETTEXT_SLUGS
False
CMS_FLAT_URLS
False
CMS_FRONTEND_LANGUAGES
['en']
CMS_HIDE_UNTRANSLATED
False
CMS_LANGUAGES
(('en', 'English'),)
CMS_LANGUAGE_CONF
{'en': ['fr', 'de']}
CMS_LANGUAGE_FALLBACK
True
CMS_MEDIA_PATH
'cms/'
CMS_MEDIA_ROOT
'C:/oss/django-cms/2.1/cms/media/cms/'
CMS_MEDIA_URL
'/media/cms/'
CMS_MENU_TITLE_OVERWRITE
True
CMS_MODERATOR
True
CMS_NAVIGATION_EXTENDERS
(('example.categories.navigation.get_nodes', 'Categories'),
('example.sampleapp.menu_extender.get_nodes', 'SampleApp Menu'))
CMS_NAVIGATION_MODIFIERS
()
CMS_PAGE_MEDIA_PATH
'cms_page_media/'
CMS_PERMISSION
True
CMS_PLACEHOLDER_CONF
{'body': {'extra_context': {'theme': '16_5'}, 'name': 'body'},
'fancy-content': {'extra_context': {'theme': '16_11'}, 'limits':
{'TextPlugin': 1, 'global': 3}, 'name': 'fancy content custom name',
'plugins': ('TextPlugin', 'LinkPlugin')}, 'right-column':
{'extra_context': {'theme': '16_16'}, 'name': 'right column', 'plugins':
('FilePlugin', 'FlashPlugin', 'LinkPlugin', 'PicturePlugin',
'TextPlugin', 'SnippetPlugin')}}
CMS_REDIRECTS
True
CMS_SEO_FIELDS
True
CMS_SHOW_END_DATE
False
CMS_SHOW_START_DATE
False
CMS_SOFTROOT
True
CMS_TEMPLATES
(('index.html', 'default'), ('article_index.html', 'article index'),
('navigation.html', 'navigation'), ('INHERIT',
<django.utils.functional.__proxy__ object at 0x0277ADB0>))
CMS_TEMPLATE_INHERITANCE
True
CMS_TEMPLATE_INHERITANCE_MAGIC
'INHERIT'
CMS_TITLE_CHARACTER
'+'
CMS_URL_OVERWRITE
True
COMMENTS_ALLOW_PROFANITIES
False
COMMENTS_BANNED_USERS_GROUP
None
COMMENTS_FIRST_FEW
0
COMMENTS_MODERATORS_GROUP
None
COMMENTS_SKETCHY_USERS_GROUP
None
DATABASE_ENGINE
'postgresql_psycopg2'
DATABASE_HOST
'colinux'
DATABASE_NAME
'cms'
DATABASE_OPTIONS
{}
DATABASE_PASSWORD
'********************'
DATABASE_PORT
''
DATABASE_SUPPORTS_TRANSACTIONS
True
DATABASE_USER
'cms'
DATETIME_FORMAT
'N j, Y, P'
DATE_FORMAT
'N j, Y'
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
()
EMAIL_HOST
'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
''
EMAIL_PORT
25
EMAIL_SUBJECT_PREFIX
'[Django] '
EMAIL_USE_TLS
False
FILE_CHARSET
'utf-8'
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler')
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_TEMP_DIR
None
FIXTURE_DIRS
['C:\\dropbox\\djcode\\redmule\\fixtures']
FORCE_SCRIPT_NAME
None
IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico',
'.php')
IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
INSTALLED_APPS
['django.contrib.auth', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.admin',
'django.contrib.sites', 'cms', 'publisher', 'cms.plugins.text',
'cms.plugins.picture', 'cms.plugins.file', 'cms.plugins.flash',
'cms.plugins.link', 'cms.plugins.snippet', 'cms.plugins.googlemap',
'cms.plugins.teaser', 'cms.plugins.video', 'cms.plugins.twitter',
'cms.plugins.inherit', 'mptt', 'reversion', 'redmule.categories',
'south', 'redmule.sampleapp', 'redmule.timeapp', 'redmule.wisdom',
'redmule.advocacy', 'basic.blog', 'basic.inlines']
INTERNAL_IPS
('127.0.0.1',)
LANGUAGES
(('en', 'English'),)
LANGUAGES_BIDI
('he', 'ar', 'fa')
LANGUAGE_CODE
'en'
LANGUAGE_COOKIE_NAME
'django_language'
LOCALE_PATHS
()
LOGIN_REDIRECT_URL
'/accounts/profile/'
LOGIN_URL
'/accounts/login/'
LOGOUT_URL
'/accounts/logout/'
MANAGERS
()
MEDIA_ROOT
'C:/oss/django-cms/2.1/cms/media/'
MEDIA_URL
'/media/'
MIDDLEWARE_CLASSES
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware')
MONTH_DAY_FORMAT
'F j'
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PREPEND_WWW
False
PROFANITIES_LIST
'********************'
PROJECT_DIR
'C:\\dropbox\\djcode\\redmule'
ROOT_URLCONF
'redmule.urls'
SECRET_KEY
'********************'
SEND_BROKEN_LINK_EMAILS
False
SERVER_EMAIL
'root@localhost'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SETTINGS_MODULE
'redmule.settings'
SITE_ID
1
TEMPLATE_CONTEXT_PROCESSORS
('django.core.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.request',
'django.core.context_processors.media', 'cms.context_processors.media',
'redmule.wisdom.context_procs.get_wisdom',
'redmule.advocacy.context_procs.get_advocacy')
TEMPLATE_DEBUG
True
TEMPLATE_DIRS
('C:\\dropbox\\djcode\\redmule\\templates',)
TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source')
TEMPLATE_STRING_IF_INVALID
''
TEST_DATABASE_CHARSET
'utf8'
TEST_DATABASE_COLLATION
'utf8_general_ci'
TEST_DATABASE_NAME
None
TEST_RUNNER
'django.test.simple.run_tests'
TIME_FORMAT
'P'
TIME_ZONE
'America/Chicago'
TRANSACTIONS_MANAGED
False
URL_VALIDATOR_USER_AGENT
'Django/1.1.1 (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
False
YEAR_MONTH_FORMAT
'F Y'

You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard
500 page.

olivergeorge

unread,
Mar 5, 2010, 7:38:40 PM3/5/10
to Django Basic Apps
Hey Michael

I happened to be playing with django-wysiwyg yesterday. I found that
easy_install pulled what seemed to be an old codebase missing key
features. Try pulling a copy from http://github.com/pydanny/django-wysiwyg
directly.

cheers, Oliver

>         734. #...@register.tag

>         931. #...@register.tag


>         932. def now(parser, token):
>         933. """
>        ▶ Local vars
>        Variable         Value
>        bits    
>        [u'load', u'wysiwyg']
>        e        
>        InvalidTemplateLibrary(u'Could not load template library from
> django.templatetags.wysiwyg, No module named wysiwyg',)
>        parser  
>        <django.template.debug.DebugParser object at 0x02C6D0F0>
>        taglib  
>        u'wysiwyg'
>        token    
>        <django.template.Token object at 0x02C6DD90>
>

> Environment: Request Method: GET Request URL:http://localhost:8000/admin/blog/post/add/Django Version: 1.1.1 Python

> do_ifequal(parser, token, False) File...
>
> read more »

Michael Hipp

unread,
Mar 5, 2010, 8:33:33 PM3/5/10
to django-b...@googlegroups.com
Thank you. I will work on it this weekend.

Michael

Reply all
Reply to author
Forward
0 new messages