Opened 16 years ago

Last modified 13 years ago

#8774 closed

ImageField errors in admin inline editing — at Initial Version

Reported by: ramin Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: imagefield admin inline
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When trying to edit a model that has another model inlined in the admin the following error occurs. This doesn't occur when creating a new instance. The error was first sighted from an SVN version on Friday 28.8.2008 and is still present in rev 8814.

Template error

In template /usr/lib/python2.5/site-packages/django/contrib/admin/templates/admin/edit_inline/tabular.html, error at line 24
Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found
14 {% endfor %}
15 {% if inline_admin_formset.formset.can_delete %}<th>{% trans "Delete?" %}</th>{% endif %}
16 </tr></thead>
17
18 {% for inline_admin_form in inline_admin_formset %}
19
20 <tr class="{% cycle row1,row2 %} {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}">
21
22 <td class="original">
23 {% if inline_admin_form.original or inline_admin_form.show_url %}<p>
24 {% if inline_admin_form.original %} {{ inline_admin_form.original }}{% endif %}
25 {% if inline_admin_form.show_url %}<a href="../../../r/{{ inline_admin_form.original.content_type_id }}/{{ inline_admin_form.original.id }}/">{% trans "View on site" %}</a>{% endif %}
26 </p>{% endif %}
27 {{ inline_admin_form.pk_field.field }}
28 {% spaceless %}
29 {% for fieldset in inline_admin_form %}
30 {% for line in fieldset %}
31 {% for field in line %}
32 {% if field.is_hidden %} {{ field.field }} {% endif %}
33 {% endfor %}
34 {% endfor %}
Traceback Switch to copy-and-paste view

  • /usr/lib/python2.5/site-packages/django/core/handlers/base.py in get_response
    1. # Apply view middleware
    2. for middleware_method in self._view_middleware:
    3. response = middleware_method(request, callback, callback_args, callback_kwargs)
    4. if response:
    5. return response 84.
    6. try:
    7. response = callback(request, *callback_args, callback_kwargs) ...
    8. except Exception, e:
    9. # If the view raised an exception, run it through exception
    10. # middleware, and if the exception middleware returns a
    11. # response, use that. Otherwise, reraise the exception.
    12. for middleware_method in self._exception_middleware:
    13. response = middleware_method(request, e)
    ▶ Local vars Variable Value callback <bound method AdminSite.root of <django.contrib.admin.sites.AdminSite object at 0x84d58ac>> callback_args (u'blogengine/entry/7792/',) callback_kwargs {} e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) exc_info (<class 'django.template.TemplateSyntaxError'>, TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',), <traceback object at 0x88a389c>) exceptions <module 'django.core.exceptions' from '/usr/lib/python2.5/site-packages/django/core/exceptions.pyc'> middleware_method <bound method XViewMiddleware.process_view of <django.middleware.doc.XViewMiddleware object at 0x863cdac>> receivers [(<function _rollback_on_exception at 0x83c080c>, None)] request <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> resolver <RegexURLResolver lifeofjalo.urls /> response None self <django.core.handlers.wsgi.WSGIHandler object at 0x855f68c> settings <django.conf.LazySettings object at 0xb7c67f8c> urlconf 'lifeofjalo.urls' urlresolvers <module 'django.core.urlresolvers' from '/usr/lib/python2.5/site-packages/django/core/urlresolvers.pyc'>
  • /usr/lib/python2.5/site-packages/django/contrib/admin/sites.py in root
    1. return self.i18n_javascript(request)
    2. # urls starting with 'r/' are for the "show in web" links
    3. elif url.startswith('r/'):
    4. from django.views.defaults import shortcut
    5. return shortcut(request, *url.split('/')[1:])
    6. else:
    7. if '/' in url:
    8. return self.model_page(request, *url.split('/', 2)) ...
    9. else:
    10. return self.app_index(request, url) 176.
    11. raise http.Http404('The requested admin page does not exist.') 178.
    12. def model_page(self, request, app_label, model_name, rest_of_url=None):
    ▶ Local vars Variable Value request <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, '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 0x84d58ac> url u'blogengine/entry/7792'
  • /usr/lib/python2.5/site-packages/django/views/decorators/cache.py in _wrapped_view_func

37.

  1. def never_cache(view_func):
  2. """
  3. Decorator that adds headers to a response so that it will
  4. never be cached.
  5. """
  6. def _wrapped_view_func(request, *args, kwargs):
  7. response = view_func(request, *args, kwargs) ...
  8. add_never_cache_headers(response)
  9. return response
  10. return wraps(view_func)(_wrapped_view_func)

▶ Local vars
Variable Value
args
(<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, u'blogengine', u'entry', u'7792')
kwargs
{}
request
<django.contrib.admin.sites.AdminSite object at 0x84d58ac>
view_func
<function model_page at 0x84d809c>

  • /usr/lib/python2.5/site-packages/django/contrib/admin/sites.py in model_page
    1. model = models.get_model(app_label, model_name)
    2. if model is None:
    3. raise http.Http404("App %r, model %r, not found." % (app_label, model_name))
    4. try:
    5. admin_obj = self._registry[model]
    6. except KeyError:
    7. raise http.Http404("This model exists but has not been registered with the admin site.")
    8. return admin_obj(request, rest_of_url) ...
    9. model_page = never_cache(model_page) 194.
    10. def password_change(self, request):
    11. """
    12. Handles the "change password" task -- both form display and validation.
    13. """
    ▶ Local vars Variable Value admin_obj <lifeofjalo.blogengine.admin.EntryAdmin object at 0x86b94ac> app_label u'blogengine' model <class 'lifeofjalo.blogengine.models.Entry'> model_name u'entry' models <module 'django.db.models' from '/usr/lib/python2.5/site-packages/django/db/models/init.pyc'> request <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> rest_of_url u'7792' self <django.contrib.admin.sites.AdminSite object at 0x84d58ac>
  • /usr/lib/python2.5/site-packages/django/contrib/admin/options.py in call
    1. elif url == "add":
    2. return self.add_view(request)
    3. elif url.endswith('/history'):
    4. return self.history_view(request, unquote(url[:-8]))
    5. elif url.endswith('/delete'):
    6. return self.delete_view(request, unquote(url[:-7]))
    7. else:
    8. return self.change_view(request, unquote(url)) ... 197.
    9. def _media(self):
    10. from django.conf import settings 200.
    11. js = ['js/core.js', 'js/admin/RelatedObjectLookups.js']
    12. if self.prepopulated_fields:
    ▶ Local vars Variable Value request <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> self <lifeofjalo.blogengine.admin.EntryAdmin object at 0x86b94ac> url u'7792'
  • /usr/lib/python2.5/site-packages/django/db/transaction.py in _commit_on_success
    1. control in web apps.
    2. """
    3. def _commit_on_success(*args, kw):
    4. try:
    5. enter_transaction_management()
    6. managed(True)
    7. try:
    8. res = func(*args, kw) ...
    9. except:
    10. # All exceptions must be handled here (even string ones).
    11. if is_dirty():
    12. rollback()
    13. raise
    14. else:
    ▶ Local vars Variable Value args (<lifeofjalo.blogengine.admin.EntryAdmin object at 0x86b94ac>, <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, u'7792') func <function change_view at 0x84ae924> kw {}
  • /usr/lib/python2.5/site-packages/django/contrib/admin/options.py in change_view
    1. 'media': mark_safe(media),
    2. 'inline_admin_formsets': inline_admin_formsets,
    3. 'errors': helpers.AdminErrorList(form, formsets),
    4. 'root_path': self.admin_site.root_path,
    5. 'app_label': app_label,
    6. }
    7. context.update(extra_context or {})
    8. return self.render_change_form(request, context, change=True, obj=obj) ...
    9. change_view = transaction.commit_on_success(change_view) 622.
    10. def changelist_view(self, request, extra_context=None):
    11. "The 'change list' admin view for this model."
    12. from django.contrib.admin.views.main import ChangeList, ERROR_FLAG
    13. opts = self.model._meta
    ▶ Local vars Variable Value FormSet <class 'django.forms.formsets.ImageFormFormSet'> ModelForm <class 'django.forms.models.EntryForm'> adminForm <django.contrib.admin.helpers.AdminForm object at 0x873e22c> app_label 'blogengine' context {'add': False, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'app_label': 'blogengine', 'change': True, 'content_type_id': 9L, 'errors': [], 'form_url': , 'has_absolute_url': False, 'has_add_permission': True, 'has_change_permission': True, 'has_delete_permission': True, 'has_file_field': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'object_id': u'7792', 'opts': <Options for Entry>, 'ordered_objects': [], 'original': <Entry: 2008-08-09 00:00:00>, 'root_path': u'/admin/', 'save_as': False, 'save_on_top': False, 'title': u'Change entry'} extra_context None fieldsets [(None, {'fields': ['file', 'caption', 'captionFI']})] form <django.forms.models.EntryForm object at 0x873e5ec> formset <django.forms.formsets.ImageFormFormSet object at 0x8741d6c> formsets [<django.forms.formsets.ImageFormFormSet object at 0x8741d6c>] inline <lifeofjalo.blogengine.admin.ImageInline object at 0x86b948c> inline_admin_formset <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c> inline_admin_formsets [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>] media <django.forms.widgets.Media object at 0x87f8e4c> model <class 'lifeofjalo.blogengine.models.Entry'> obj <Entry: 2008-08-09 00:00:00> object_id u'7792' opts <Options for Entry> request <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> self <lifeofjalo.blogengine.admin.EntryAdmin object at 0x86b94ac>
  • /usr/lib/python2.5/site-packages/django/contrib/admin/options.py in render_change_form
    1. 'save_on_top': self.save_on_top,
    2. 'root_path': self.admin_site.root_path,
    3. })
    4. return render_to_response(self.change_form_template or [
    5. "admin/%s/%s/change_form.html" % (app_label, opts.object_name.lower()),
    6. "admin/%s/change_form.html" % app_label,
    7. "admin/change_form.html"
    8. ], context, context_instance=template.RequestContext(request)) ... 403.
    9. def response_add(self, request, obj, post_url_continue='../%s/'):
    10. """
    11. Determines the HttpResponse for the add_view stage.
    12. """
    13. opts = obj._meta
    ▶ Local vars Variable Value add False app_label 'blogengine' change True context {'add': False, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'app_label': 'blogengine', 'change': True, 'content_type_id': 9L, 'errors': [], 'form_url': , 'has_absolute_url': False, 'has_add_permission': True, 'has_change_permission': True, 'has_delete_permission': True, 'has_file_field': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'object_id': u'7792', 'opts': <Options for Entry>, 'ordered_objects': [], 'original': <Entry: 2008-08-09 00:00:00>, 'root_path': u'/admin/', 'save_as': False, 'save_on_top': False, 'title': u'Change entry'} form_url obj <Entry: 2008-08-09 00:00:00> opts <Options for Entry> ordered_objects [] request <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'loj': '813779e21550f0ec85afab540dcaaead'}, META:{'COLORTERM': 'gnome-terminal', 'CONTENT_LENGTH': , 'CONTENT_TYPE': 'text/plain', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-JScisqaUty,guid=a44545a8bb30caddf309679148bc008f', 'DESKTOP_SESSION': 'default', 'DISPLAY': ':0.0', 'DJANGO_SETTINGS_MODULE': 'lifeofjalo.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GDMSESSION': 'default', 'GDM_LANG': 'en_US.UTF-8', 'GDM_XSERVER_LOCATION': 'local', 'GNOME_DESKTOP_SESSION_ID': 'Default', 'GNOME_KEYRING_PID': '11923', 'GNOME_KEYRING_SOCKET': '/tmp/keyring-aOeKUS/socket', 'GPG_AGENT_INFO': '/tmp/seahorse-ZM5CqE/S.gpg-agent:12030:1', 'GTK_RC_FILES': '/etc/gtk/gtkrc:/home/ramin/.gtkrc-1.2-gnome2', 'HISTCONTROL': 'ignoreboth', 'HOME': '/home/ramin', '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': 'loj=813779e21550f0ec85afab540dcaaead', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LIBGL_DRIVERS_PATH': '/usr/lib/dri', 'LOGNAME': 'ramin', 'LS_COLORS': 'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:', 'PATH': '/home/ramin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/admin/blogengine/entry/7792/', 'PWD': '/home/ramin/devel/lifeofjalo', 'PYTHONPATH': ':/home/ramin/devel/python', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u, 'SERVER_NAME': 'shaftoe.home.fierymill.net', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.2', 'SESSION_MANAGER': 'local/shaftoe:/tmp/.ICE-unix/11924', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_AUTH_SOCK': '/tmp/keyring-aOeKUS/ssh', 'TERM': 'xterm', 'TZ': 'Europe/Helsinki', 'USER': 'ramin', 'USERNAME': 'ramin', 'WINDOWID': '31457663', 'WINDOWPATH': '7:7', 'XAUTHORITY': '/tmp/.gdm5V5MGU', 'XDG_DATA_DIRS': '/usr/local/share/:/usr/share/:/usr/share/gdm/', 'XDG_SESSION_COOKIE': '2da2e590671719852a41670046d7eae7-1220280461.811025-1645281592', '_': '/usr/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb7d150b0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x87ac1b4>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> self <lifeofjalo.blogengine.admin.EntryAdmin object at 0x86b94ac>
  • /usr/lib/python2.5/site-packages/django/shortcuts/init.py in render_to_response

11.

  1. def render_to_response(*args, kwargs):
  2. """
  3. Returns a HttpResponse whose content is filled with the result of calling
  4. django.template.loader.render_to_string() with the passed arguments.
  5. """
  6. httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype', None)}
  7. return HttpResponse(loader.render_to_string(*args, kwargs), httpresponse_kwargs) ... 19.
  8. def _get_queryset(klass):
  9. """
  10. Returns a QuerySet from a Model, Manager, or QuerySet. Created to make
  11. get_object_or_404 and get_list_or_404 more DRY.
  12. """

▶ Local vars
Variable Value
args
(['admin/blogengine/entry/change_form.html', 'admin/blogengine/change_form.html', 'admin/change_form.html'], {'add': False, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'app_label': 'blogengine', 'change': True, 'content_type_id': 9L, 'errors': [], 'form_url': , 'has_absolute_url': False, 'has_add_permission': True, 'has_change_permission': True, 'has_delete_permission': True, 'has_file_field': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'object_id': u'7792', 'opts': <Options for Entry>, 'ordered_objects': [], 'original': <Entry: 2008-08-09 00:00:00>, 'root_path': u'/admin/', 'save_as': False, 'save_on_top': False, 'title': u'Change entry'})
httpresponse_kwargs
{'mimetype': None}
kwargs
{'context_instance': [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url':
, 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}]}

  • /usr/lib/python2.5/site-packages/django/template/loader.py in render_to_string
    1. t = select_template(template_name)
    2. else:
    3. t = get_template(template_name)
    4. if context_instance:
    5. context_instance.update(dictionary)
    6. else:
    7. context_instance = Context(dictionary)
    8. return t.render(context_instance) ... 108.
    9. def select_template(template_name_list):
    10. "Given a list of template names, returns the first that can be loaded."
    11. for template_name in template_name_list:
    12. try:
    13. return get_template(template_name)
    ▶ Local vars Variable Value context_instance [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] dictionary {'add': False, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'app_label': 'blogengine', 'change': True, 'content_type_id': 9L, 'errors': [], 'form_url': , 'has_absolute_url': False, 'has_add_permission': True, 'has_change_permission': True, 'has_delete_permission': True, 'has_file_field': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'object_id': u'7792', 'opts': <Options for Entry>, 'ordered_objects': [], 'original': <Entry: 2008-08-09 00:00:00>, 'root_path': u'/admin/', 'save_as': False, 'save_on_top': False, 'title': u'Change entry'} t <django.template.Template object at 0x87f8eac> template_name ['admin/blogengine/entry/change_form.html', 'admin/blogengine/change_form.html', 'admin/change_form.html']
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. def iter(self):
    2. for node in self.nodelist:
    3. for subnode in node:
    4. yield subnode 173.
    5. def render(self, context):
    6. "Display stage -- can be called many times"
    7. return self.nodelist.render(context) ... 177.
    8. def compile_string(template_string, origin):
    9. "Compiles template_string into NodeList ready for rendering"
    10. if settings.TEMPLATE_DEBUG:
    11. from debug import DebugLexer, DebugParser
    12. lexer_class, parser_class = DebugLexer, DebugParser
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] self <django.template.Template object at 0x87f8eac>
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. # extend_nodelist().
    2. contains_nontext = False 763.
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    7. bits.append(self.render_node(node, context)) ...
    8. else:
    9. bits.append(node)
    10. return mark_safe(.join([force_unicode(b) for b in bits])) 772.
    11. def get_nodes_by_type(self, nodetype):
    12. "Return a list of all nodes of the given type"
    ▶ Local vars Variable Value bits [] context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] node <ExtendsNode: extends "admin/base_site.html"> self [<ExtendsNode: extends "admin/base_site.html">]
  • /usr/lib/python2.5/site-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source 67.
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    7. result = node.render(context) ...
    8. except TemplateSyntaxError, e:
    9. if not hasattr(e, 'source'):
    10. e.source = node.source
    11. raise
    12. except Exception, e:
    13. from sys import exc_info
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) node <ExtendsNode: extends "admin/base_site.html"> self [<ExtendsNode: extends "admin/base_site.html">]
  • /usr/lib/python2.5/site-packages/django/template/loader_tags.py in render
    1. # the first non-text node you can stop looking.
    2. break
    3. else:
    4. # Keep any existing parents and add a new one. Used by BlockNode.
    5. parent_block.parent = block_node.parent
    6. parent_block.add_parent(parent_block.nodelist)
    7. parent_block.nodelist = block_node.nodelist
    8. return compiled_parent.render(context) ... 98.
    9. class ConstantIncludeNode(Node):
  1. def init(self, template_path):
  2. try:
  3. t = get_template(template_path)
  4. self.template = t

▶ Local vars
Variable Value
block_node
<Block Node: after_related_objects. Contents: []>
compiled_parent
<django.template.Template object at 0x87f8c8c>
context
[{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}]
n
<Block Node: nav-global. Contents: []>
node
<ExtendsNode: extends "admin/base.html">
parent_blocks
{u'branding': <Block Node: branding. Contents: [<Text Node: ' <h1 id="site-name">'>, <django.templatetags.i18n.TranslateNode object at 0x87afe0c>, <Text Node: '</h1> '>]>, u'nav-global': <Block Node: nav-global. Contents: []>, u'title': <Block Node: title. Contents: [<Variable Node: title|escape>, <Text Node: ' | '>, <django.templatetags.i18n.TranslateNode object at 0x87aff2c>]>}
self
<ExtendsNode: extends "admin/base_site.html">

  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. def iter(self):
    2. for node in self.nodelist:
    3. for subnode in node:
    4. yield subnode 173.
    5. def render(self, context):
    6. "Display stage -- can be called many times"
    7. return self.nodelist.render(context) ... 177.
    8. def compile_string(template_string, origin):
    9. "Compiles template_string into NodeList ready for rendering"
    10. if settings.TEMPLATE_DEBUG:
    11. from debug import DebugLexer, DebugParser
    12. lexer_class, parser_class = DebugLexer, DebugParser
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] self <django.template.Template object at 0x87f8c8c>
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. # extend_nodelist().
    2. contains_nontext = False 763.
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    7. bits.append(self.render_node(node, context)) ...
    8. else:
    9. bits.append(node)
    10. return mark_safe(.join([force_unicode(b) for b in bits])) 772.
    11. def get_nodes_by_type(self, nodetype):
    12. "Return a list of all nodes of the given type"
    ▶ Local vars Variable Value bits [] context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] node <ExtendsNode: extends "admin/base.html"> self [<ExtendsNode: extends "admin/base.html">]
  • /usr/lib/python2.5/site-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source 67.
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    7. result = node.render(context) ...
    8. except TemplateSyntaxError, e:
    9. if not hasattr(e, 'source'):
    10. e.source = node.source
    11. raise
    12. except Exception, e:
    13. from sys import exc_info
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) node <ExtendsNode: extends "admin/base.html"> self [<ExtendsNode: extends "admin/base.html">]
  • /usr/lib/python2.5/site-packages/django/template/loader_tags.py in render
    1. # the first non-text node you can stop looking.
    2. break
    3. else:
    4. # Keep any existing parents and add a new one. Used by BlockNode.
    5. parent_block.parent = block_node.parent
    6. parent_block.add_parent(parent_block.nodelist)
    7. parent_block.nodelist = block_node.nodelist
    8. return compiled_parent.render(context) ... 98.
    9. class ConstantIncludeNode(Node):
  1. def init(self, template_path):
  2. try:
  3. t = get_template(template_path)
  4. self.template = t

▶ Local vars
Variable Value
block_node
<Block Node: after_related_objects. Contents: []>
compiled_parent
<django.template.Template object at 0x874756c>
context
[{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}]
n
<Block Node: footer. Contents: [<Text Node: '<div id="footer"></div>'>]>
node
<Variable Node: LANGUAGE_CODE>
parent_block
<Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>
parent_blocks
{u'blockbots': <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>, u'bodyclass': <Block Node: bodyclass. Contents: [<Variable Node: opts.app_label>, <Text Node: '-'>, <Variable Node: opts.object_name.lower>, <Text Node: ' change-form'>]>, u'branding': <Block Node: branding. Contents: [<Text Node: ' <h1 id="site-name">'>, <django.templatetags.i18n.TranslateNode object at 0x87afe0c>, <Text Node: '</h1> '>]>, u'breadcrumbs': <Block Node: breadcrumbs. Contents: [<If node>]>, u'coltype': <Block Node: coltype. Contents: [<If node>]>, u'content': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>, u'content_title': <Block Node: content_title. Contents: [<If node>]>, u'extrahead': <Block Node: extrahead. Contents: [<Variable Node: block.super>, <Text Node: ' <script type="text/javas'>, <Variable Node: media>, <Text Node: ' '>]>, u'extrastyle': <Block Node: extrastyle. Contents: []>, u'footer': <Block Node: footer. Contents: [<Text Node: '<div id="footer"></div>'>]>, u'nav-global': <Block Node: nav-global. Contents: []>, u'object-tools': <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, u'pretitle': <Block Node: pretitle. Contents: []>, u'sidebar': <Block Node: sidebar. Contents: []>, u'stylesheet': <Block Node: stylesheet. Contents: [<django.template.SimpleNode object at 0x879648c>, <Text Node: 'css/forms.css'>]>, u'stylesheet_rtl': <Block Node: stylesheet_rtl. Contents: [<django.template.SimpleNode object at 0x877ec6c>, <Text Node: 'css/rtl.css'>]>, u'title': <Block Node: title. Contents: [<Variable Node: title|escape>, <Text Node: ' | '>, <django.templatetags.i18n.TranslateNode object at 0x87aff2c>]>, u'userlinks': <Block Node: userlinks. Contents: [<django.template.defaulttags.URLNode object at 0x857668c>, <If node>, <Text Node: '<a href="'>, <Variable Node: root_path>, <Text Node: 'password_change/">'>, <django.templatetags.i18n.TranslateNode object at 0x87af58c>, <Text Node: '</a> / <a href="'>, <Variable Node: root_path>, <Text Node: 'logout/">'>, <django.templatetags.i18n.TranslateNode object at 0x877e22c>, <Text Node: '</a>'>]>}
self
<ExtendsNode: extends "admin/base.html">

  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. def iter(self):
    2. for node in self.nodelist:
    3. for subnode in node:
    4. yield subnode 173.
    5. def render(self, context):
    6. "Display stage -- can be called many times"
    7. return self.nodelist.render(context) ... 177.
    8. def compile_string(template_string, origin):
    9. "Compiles template_string into NodeList ready for rendering"
    10. if settings.TEMPLATE_DEBUG:
    11. from debug import DebugLexer, DebugParser
    12. lexer_class, parser_class = DebugLexer, DebugParser
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] self <django.template.Template object at 0x874756c>
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. # extend_nodelist().
    2. contains_nontext = False 763.
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    7. bits.append(self.render_node(node, context)) ...
    8. else:
    9. bits.append(node)
    10. return mark_safe(.join([force_unicode(b) for b in bits])) 772.
    11. def get_nodes_by_type(self, nodetype):
    12. "Return a list of all nodes of the given type"
    ▶ Local vars Variable Value bits [u'<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" lang="', u'en', u'" xml:lang="', u'en', u'" ', , u'>\n<head>\n<title>', u'Change entry | Life of Jalo admin', u'</title>\n<link rel="stylesheet" type="text/css" href="', u'/admin/static/css/forms.css', u'" />\n', , u'\n', , u'\n', u'\n<script type="text/javascript" src="../../../jsi18n/"></script>\n<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>\n', u'\n', u'<meta name="robots" content="NONE,NOARCHIVE" />', u'\n</head>\n', , u'\n\n<body class="', , u'blogengine-entry change-form', u'">\n\n<!-- Container -->\n<div id="container">\n\n ', u'\n <!-- Header -->\n <div id="header">\n <div id="branding">\n \n<h1 id="site-name">Life of Jalo administration</h1>\n\n </div>\n \n <div id="user-tools">Welcome, <strong>ramin</strong>. <a href="/admin/password_change/">Change password</a> / <a href="/admin/logout/">Log out</a></div>\n \n \n </div>\n <!-- END Header -->\n \n<div class="breadcrumbs">\n <a href="../../../">Home</a> &rsaquo;\n <a href="../../">Blogengine</a> &rsaquo; \n <a href="../">Entrys</a> &rsaquo;\n 2008-08-09 00:00:00\n</div>\n\n ', u'\n\n ', , u'\n\n <!-- Content -->\n <div id="content" class="', u'colM', u'">\n ', , u'\n ', u'<h1>Change entry</h1>', u'\n '] context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] node <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]> self [<Text Node: '<!DOCTYPE html PUBLIC "-/'>, <Variable Node: LANGUAGE_CODE>, <Text Node: '" xml:lang="'>, <Variable Node: LANGUAGE_CODE>, <Text Node: '" '>, <If node>, <Text Node: '> <head> <title>'>, <Block Node: title. Contents: [<Variable Node: title|escape>, <Text Node: ' | '>, <django.templatetags.i18n.TranslateNode object at 0x87aff2c>]>, <Text Node: '</title> <link rel="style'>, <Block Node: stylesheet. Contents: [<django.template.SimpleNode object at 0x879648c>, <Text Node: 'css/forms.css'>]>, <Text Node: '" /> '>, <If node>, <Text Node: ' '>, <Block Node: extrastyle. Contents: []>, <Text Node: ' '>, <Block Node: extrahead. Contents: [<Variable Node: block.super>, <Text Node: ' <script type="text/javas'>, <Variable Node: media>, <Text Node: ' '>]>, <Text Node: ' '>, <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>, <Text Node: ' </head> '>, <django.template.defaulttags.LoadNode object at 0x87aad4c>, <Text Node: ' <body class="'>, <If node>, <Block Node: bodyclass. Contents: [<Variable Node: opts.app_label>, <Text Node: '-'>, <Variable Node: opts.object_name.lower>, <Text Node: ' change-form'>]>, <Text Node: '"> <!-- Container --> <d'>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' <!-- Content --> '>, <Block Node: coltype. Contents: [<If node>]>, <Text Node: '"> '>, <Block Node: pretitle. Contents: []>, <Text Node: ' '>, <Block Node: content_title. Contents: [<If node>]>, <Text Node: ' '>, <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>, <Text Node: ' '>, <Block Node: sidebar. Contents: []>, <Text Node: ' <br class="clear'>, <Block Node: footer. Contents: [<Text Node: '<div id="footer"></div>'>]>, <Text Node: ' </div> <!-- END Containe'>]
  • /usr/lib/python2.5/site-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source 67.
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    7. result = node.render(context) ...
    8. except TemplateSyntaxError, e:
    9. if not hasattr(e, 'source'):
    10. e.source = node.source
    11. raise
    12. except Exception, e:
    13. from sys import exc_info
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) node <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]> self [<Text Node: '<!DOCTYPE html PUBLIC "-/'>, <Variable Node: LANGUAGE_CODE>, <Text Node: '" xml:lang="'>, <Variable Node: LANGUAGE_CODE>, <Text Node: '" '>, <If node>, <Text Node: '> <head> <title>'>, <Block Node: title. Contents: [<Variable Node: title|escape>, <Text Node: ' | '>, <django.templatetags.i18n.TranslateNode object at 0x87aff2c>]>, <Text Node: '</title> <link rel="style'>, <Block Node: stylesheet. Contents: [<django.template.SimpleNode object at 0x879648c>, <Text Node: 'css/forms.css'>]>, <Text Node: '" /> '>, <If node>, <Text Node: ' '>, <Block Node: extrastyle. Contents: []>, <Text Node: ' '>, <Block Node: extrahead. Contents: [<Variable Node: block.super>, <Text Node: ' <script type="text/javas'>, <Variable Node: media>, <Text Node: ' '>]>, <Text Node: ' '>, <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>, <Text Node: ' </head> '>, <django.template.defaulttags.LoadNode object at 0x87aad4c>, <Text Node: ' <body class="'>, <If node>, <Block Node: bodyclass. Contents: [<Variable Node: opts.app_label>, <Text Node: '-'>, <Variable Node: opts.object_name.lower>, <Text Node: ' change-form'>]>, <Text Node: '"> <!-- Container --> <d'>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' <!-- Content --> '>, <Block Node: coltype. Contents: [<If node>]>, <Text Node: '"> '>, <Block Node: pretitle. Contents: []>, <Text Node: ' '>, <Block Node: content_title. Contents: [<If node>]>, <Text Node: ' '>, <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>, <Text Node: ' '>, <Block Node: sidebar. Contents: []>, <Text Node: ' <br class="clear'>, <Block Node: footer. Contents: [<Text Node: '<div id="footer"></div>'>]>, <Text Node: ' </div> <!-- END Containe'>]
  • /usr/lib/python2.5/site-packages/django/template/loader_tags.py in render
    1. return "<Block Node: %s. Contents: %r>" % (self.name, self.nodelist) 18.
    2. def render(self, context):
    3. context.push()
    4. # Save context in case of block.super().
    5. self.context = context
    6. contextblock = self
    7. result = self.nodelist.render(context) ...
    8. context.pop()
    9. return result 27.
    10. def super(self):
    11. if self.parent:
    12. return mark_safe(self.parent.render(self.context))
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] self <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. # extend_nodelist().
    2. contains_nontext = False 763.
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    7. bits.append(self.render_node(node, context)) ...
    8. else:
    9. bits.append(node)
    10. return mark_safe(.join([force_unicode(b) for b in bits])) 772.
    11. def get_nodes_by_type(self, nodetype):
    12. "Return a list of all nodes of the given type"
    ▶ Local vars Variable Value bits [u'<div id="content-main">\n', u'\n\n <ul class="object-tools"><li><a href="history/" class="historylink">History</a></li>\n \n </ul>\n\n', u'\n<form ', u'enctype="multipart/form-data" ', u'action="', u, u'" method="post" id="', u'entry', u'_form">', , u'\n<div>\n', , u'\n', , u'\n', , u'\n\n', u'\n <fieldset class="module aligned ">\n \n \n \n <div class="form-row pub_date ">\n \n \n \n <label for="id_pub_date" class="required">Publication date:</label><input type="text" name="pub_date" value="2008-08-09 00:00:00" id="id_pub_date" />\n \n \n \n </div>\n \n <div class="form-row title ">\n \n \n \n <label for="id_title">Title:</label><input id="id_title" type="text" name="title" maxlength="200" />\n \n \n \n </div>\n \n <div class="form-row titleFI ">\n \n \n \n <label for="id_titleFI">Finnish title:</label><input id="id_titleFI" type="text" name="titleFI" maxlength="200" />\n \n \n \n </div>\n \n <div class="form-row isMemorial ">\n \n \n \n <input type="checkbox" name="isMemorial" id="id_isMemorial" /><label for="id_isMemorial" class="vCheckboxLabel">Use special layout?</label>\n \n \n \n </div>\n \n <div class="form-row tags ">\n \n \n \n <label for="id_tags">Tags:</label><input id="id_tags" type="text" name="tags" maxlength="200" />\n \n \n \n </div>\n \n</fieldset>\n\n', u'\n\n', , u'\n\n'] context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] node <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3> self [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]
  • /usr/lib/python2.5/site-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source 67.
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    7. result = node.render(context) ...
    8. except TemplateSyntaxError, e:
    9. if not hasattr(e, 'source'):
    10. e.source = node.source
    11. raise
    12. except Exception, e:
    13. from sys import exc_info
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) node <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3> self [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]
  • /usr/lib/python2.5/site-packages/django/template/defaulttags.py in render
    1. if unpack:
    2. # If there are multiple loop variables, unpack the item into
    3. # them.
    4. context.update(dict(zip(self.loopvars, item)))
    5. else:
    6. context[self.loopvars[0]] = item
    7. for node in self.nodelist_loop:
    8. nodelist.append(node.render(context)) ...
    9. if unpack:
    10. # The loop variables were pushed on to the context so pop them
    11. # off again. This is necessary because the tag lets the length
    12. # of loopvars differ to the length of each set of items and we
    13. # don't want to leave any vars from the previous loop on the
    14. # context.
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] i 0 item <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c> len_values 1 loop_dict {'counter': 1, 'counter0': 0, 'first': True, 'last': True, 'parentloop': {}, 'revcounter': 1, 'revcounter0': 0} node <django.template.loader_tags.IncludeNode object at 0x879e96c> nodelist [u'\n '] parentloop {} self <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3> unpack False values [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>]
  • /usr/lib/python2.5/site-packages/django/template/loader_tags.py in render
    1. def init(self, template_name):
    2. self.template_name = Variable(template_name) 118.
    3. def render(self, context):
    4. try:
    5. template_name = self.template_name.resolve(context)
    6. t = get_template(template_name)
    7. return t.render(context) ...
    8. except TemplateSyntaxError, e:
    9. if settings.TEMPLATE_DEBUG:
    10. raise
    11. return
    12. except:
    13. return # Fail silently for invalid included templates.
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) self <django.template.loader_tags.IncludeNode object at 0x879e96c> t <django.template.Template object at 0x888ae4c> template_name 'admin/edit_inline/tabular.html'
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. def iter(self):
    2. for node in self.nodelist:
    3. for subnode in node:
    4. yield subnode 173.
    5. def render(self, context):
    6. "Display stage -- can be called many times"
    7. return self.nodelist.render(context) ... 177.
    8. def compile_string(template_string, origin):
    9. "Compiles template_string into NodeList ready for rendering"
    10. if settings.TEMPLATE_DEBUG:
    11. from debug import DebugLexer, DebugParser
    12. lexer_class, parser_class = DebugLexer, DebugParser
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] self <django.template.Template object at 0x888ae4c>
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. # extend_nodelist().
    2. contains_nontext = False 763.
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    7. bits.append(self.render_node(node, context)) ...
    8. else:
    9. bits.append(node)
    10. return mark_safe(.join([force_unicode(b) for b in bits])) 772.
    11. def get_nodes_by_type(self, nodetype):
    12. "Return a list of all nodes of the given type"
    ▶ Local vars Variable Value bits [, u'\n<div class="inline-group">\n <div class="tabular inline-related ', u'last-related', u'">\n', u'<input type="hidden" name="images-TOTAL_FORMS" value="2" id="id_images-TOTAL_FORMS" /><input type="hidden" name="images-INITIAL_FORMS" value="1" id="id_images-INITIAL_FORMS" />', u'\n<fieldset class="module">\n <h2>', u'Images', u'</h2>\n ', u, u'\n <table>\n <thead><tr>\n ', u'\n \n <th colspan="2">None</th>\n \n \n \n <th >Default caption</th>\n \n \n \n <th >Caption in Finnish</th>\n \n ', u'\n ', u'<th>Delete?</th>', u'\n </tr></thead>\n \n '] context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] node <For Node: for inline_admin_form in inline_admin_formset, tail_len: 15> self [<django.template.defaulttags.LoadNode object at 0x87b24ec>, <Text Node: ' <div class="inline-group'>, <If node>, <Text Node: '"> '>, <Variable Node: inline_admin_formset.formset.management_form>, <Text Node: ' <fieldset class="module"'>, <Variable Node: inline_admin_formset.opts.verbose_name_plural|capfirst|escape>, <Text Node: '</h2> '>, <Variable Node: inline_admin_formset.formset.non_form_errors>, <Text Node: ' <table> <thead><'>, <For Node: for field in inline_admin_formset.fields, tail_len: 3>, <Text Node: ' '>, <If node>, <Text Node: ' </tr></thead> '>, <For Node: for inline_admin_form in inline_admin_formset, tail_len: 15>, <Text Node: ' </table> </fi'>, <Text Node: ' '>, <Text Node: ' '>, <Text Node: ' </div> '>]
  • /usr/lib/python2.5/site-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source 67.
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    7. result = node.render(context) ...
    8. except TemplateSyntaxError, e:
    9. if not hasattr(e, 'source'):
    10. e.source = node.source
    11. raise
    12. except Exception, e:
    13. from sys import exc_info
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) node <For Node: for inline_admin_form in inline_admin_formset, tail_len: 15> self [<django.template.defaulttags.LoadNode object at 0x87b24ec>, <Text Node: ' <div class="inline-group'>, <If node>, <Text Node: '"> '>, <Variable Node: inline_admin_formset.formset.management_form>, <Text Node: ' <fieldset class="module"'>, <Variable Node: inline_admin_formset.opts.verbose_name_plural|capfirst|escape>, <Text Node: '</h2> '>, <Variable Node: inline_admin_formset.formset.non_form_errors>, <Text Node: ' <table> <thead><'>, <For Node: for field in inline_admin_formset.fields, tail_len: 3>, <Text Node: ' '>, <If node>, <Text Node: ' </tr></thead> '>, <For Node: for inline_admin_form in inline_admin_formset, tail_len: 15>, <Text Node: ' </table> </fi'>, <Text Node: ' '>, <Text Node: ' '>, <Text Node: ' </div> '>]
  • /usr/lib/python2.5/site-packages/django/template/defaulttags.py in render
    1. if unpack:
    2. # If there are multiple loop variables, unpack the item into
    3. # them.
    4. context.update(dict(zip(self.loopvars, item)))
    5. else:
    6. context[self.loopvars[0]] = item
    7. for node in self.nodelist_loop:
    8. nodelist.append(node.render(context)) ...
    9. if unpack:
    10. # The loop variables were pushed on to the context so pop them
    11. # off again. This is necessary because the tag lets the length
    12. # of loopvars differ to the length of each set of items and we
    13. # don't want to leave any vars from the previous loop on the
    14. # context.
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] i 0 item <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c> len_values 2 loop_dict {'counter': 1, 'counter0': 0, 'first': True, 'last': False, 'parentloop': {'counter': 1, 'counter0': 0, 'first': True, 'last': True, 'parentloop': {}, 'revcounter': 1, 'revcounter0': 0}, 'revcounter': 2, 'revcounter0': 1} node <If node> nodelist [u'\n \n <tr class="', u'row1', u' ', u'has_original', u'">\n\n <td class="original">\n '] parentloop {'counter': 1, 'counter0': 0, 'first': True, 'last': True, 'parentloop': {}, 'revcounter': 1, 'revcounter0': 0} self <For Node: for inline_admin_form in inline_admin_formset, tail_len: 15> unpack False values [<django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>, <django.contrib.admin.helpers.InlineAdminForm object at 0x88a436c>]
  • /usr/lib/python2.5/site-packages/django/template/defaulttags.py in render
    1. if self.link_type == IfNode.LinkTypes.or_:
    2. for ifnot, bool_expr in self.bool_exprs:
    3. try:
    4. value = bool_expr.resolve(context, True)
    5. except VariableDoesNotExist:
    6. value = None
    7. if (value and not ifnot) or (ifnot and not value):
    8. return self.nodelist_true.render(context) ...
    9. return self.nodelist_false.render(context)
    10. else:
    11. for ifnot, bool_expr in self.bool_exprs:
    12. try:
    13. value = bool_expr.resolve(context, True)
    14. except VariableDoesNotExist:
    ▶ Local vars Variable Value bool_expr <django.template.FilterExpression object at 0x888f36c> context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] ifnot False self <If node> value Error in formatting: coercing to Unicode: need string or buffer, ImageFieldFile found
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. # extend_nodelist().
    2. contains_nontext = False 763.
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    7. bits.append(self.render_node(node, context)) ...
    8. else:
    9. bits.append(node)
    10. return mark_safe(.join([force_unicode(b) for b in bits])) 772.
    11. def get_nodes_by_type(self, nodetype):
    12. "Return a list of all nodes of the given type"
    ▶ Local vars Variable Value bits [u'<p>\n '] context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] node <If node> self [<Text Node: '<p> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' </p>'>]
  • /usr/lib/python2.5/site-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source 67.
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    7. result = node.render(context) ...
    8. except TemplateSyntaxError, e:
    9. if not hasattr(e, 'source'):
    10. e.source = node.source
    11. raise
    12. except Exception, e:
    13. from sys import exc_info
    ▶ Local vars Variable Value context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] e TemplateSyntaxError(u'Caught an exception while rendering: coercing to Unicode: need string or buffer, ImageFieldFile found',) node <If node> self [<Text Node: '<p> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' </p>'>]
  • /usr/lib/python2.5/site-packages/django/template/defaulttags.py in render
    1. if self.link_type == IfNode.LinkTypes.or_:
    2. for ifnot, bool_expr in self.bool_exprs:
    3. try:
    4. value = bool_expr.resolve(context, True)
    5. except VariableDoesNotExist:
    6. value = None
    7. if (value and not ifnot) or (ifnot and not value):
    8. return self.nodelist_true.render(context) ...
    9. return self.nodelist_false.render(context)
    10. else:
    11. for ifnot, bool_expr in self.bool_exprs:
    12. try:
    13. value = bool_expr.resolve(context, True)
    14. except VariableDoesNotExist:
    ▶ Local vars Variable Value bool_expr <django.template.FilterExpression object at 0x87b2bec> context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] ifnot False self <If node> value Error in formatting: coercing to Unicode: need string or buffer, ImageFieldFile found
  • /usr/lib/python2.5/site-packages/django/template/init.py in render
    1. # extend_nodelist().
    2. contains_nontext = False 763.
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    7. bits.append(self.render_node(node, context)) ...
    8. else:
    9. bits.append(node)
    10. return mark_safe(.join([force_unicode(b) for b in bits])) 772.
    11. def get_nodes_by_type(self, nodetype):
    12. "Return a list of all nodes of the given type"
    ▶ Local vars Variable Value bits [u' '] context [{'forloop': {'revcounter0': 1, 'last': False, 'counter': 1, 'parentloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, 'revcounter': 2, 'counter0': 0, 'first': True}, u'inline_admin_form': <django.contrib.admin.helpers.InlineAdminForm object at 0x88a438c>}, {'forloop': {'revcounter0': 0, 'last': True, 'counter': 1, 'parentloop': {}, 'revcounter': 1, 'counter0': 0, 'first': True}, u'inline_admin_formset': <django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <Block Node: object-tools. Contents: [<Text Node: ' '>, <If node>, <Text Node: ' '>]>, <Text Node: ' <form '>, <If node>, <Text Node: 'action="'>, <Variable Node: form_url>, <Text Node: '" method="post" id="'>, <Variable Node: opts.module_name>, <Text Node: '_form">'>, <Block Node: form_top. Contents: []>, <Text Node: ' <div> '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for fieldset in adminform, tail_len: 3>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <For Node: for inline_admin_formset in inline_admin_formsets, tail_len: 3>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.template.InclusionNode object at 0x8747aec>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <Text Node: ' '>, <django.template.InclusionNode object at 0x87474ec>, <Text Node: ' </div> </form></div> '>]>}, {'has_delete_permission': True, 'has_change_permission': True, 'has_add_permission': True, 'inline_admin_formsets': [<django.contrib.admin.helpers.InlineAdminFormSet object at 0x87f8d0c>], 'is_popup': False, 'change': True, 'content_type_id': 9L, 'save_as': False, 'save_on_top': False, 'errors': [], 'has_file_field': True, 'adminform': <django.contrib.admin.helpers.AdminForm object at 0x873e22c>, 'title': u'Change entry', 'media': '<script type="text/javascript" src="/admin/static/js/core.js"></script>\n<script type="text/javascript" src="/admin/static/js/admin/RelatedObjectLookups.js"></script>', 'root_path': u'/admin/', 'object_id': u'7792', 'add': False, 'opts': <Options for Entry>, 'app_label': 'blogengine', 'form_url': , 'original': <Entry: 2008-08-09 00:00:00>, 'has_absolute_url': False, 'ordered_objects': []}, {'MEDIA_URL': 'http://localhost/tests/lifeofjalo/images/'}, {'LANGUAGES': (('fi', 'Finnish'), ('en', 'English')), 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': u'en'}, {}, {'perms': <django.core.context_processors.PermWrapper object at 0x87f8d6c>, 'messages': [], 'user': <User: ramin>}, {}] node <Variable Node: inline_admin_form.original> self [<Text Node: ' '>, <Variable Node: inline_admin_form.original>]
  • /usr/lib/python2.5/site-packages/django/template/debug.py in render_node
    1. e.source = node.source
    2. raise
    3. except Exception, e:
    4. from sys import exc_info
    5. wrapped = TemplateSyntaxError(u'Caught an exception while rendering: %s' % force_unicode(e, errors='replace'))
    6. wrapped.source = node.source
    7. wrapped.exc_info = exc_info()
    8. raise wrapped ...
    9. return result 83.
    10. class DebugVariableNode(VariableNode):
    11. def render(self, context):
    12. try:
    13. output = force_unicode(self.filter_expression.resolve(context))
    ▶ Local vars

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top