Gauravwagh / django-grappelli

Automatically exported from code.google.com/p/django-grappelli
Other
0 stars 0 forks source link

TemplateSyntaxError when deleting objects #262

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to the change-list of any model
2. Select one or more items
3. Choose "Delete selected objects" (or similar, in my case "Ausgewählte 
Artikel löschen") in the dark row at the bottom of the browser.

Expected is the "Do you really want to delete those objects?"-page. Instead  
I'm getting a TemplateSyntaxError (Caught KeyError while rendering: 
u'escaped_objects') in template 
[...]/grappelli/templates/admin/delete_selected_confirmation.html, error at 
line 32 ({% blocktrans %} is highlighted).

I'm using latest SVN with Django 1.2.1 (via easy_install) on Ubuntu Server 10.04

I'm not sure if I forgot to configure anything or messed anything up. Can 
anyone confirm this error?

Original issue reported on code.google.com by immanuel...@gmail.com on 7 Sep 2010 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by sehmaschine on 10 Sep 2010 at 4:34

GoogleCodeExporter commented 9 years ago
I can´t reproduce this error. that being said, the translation of line 32 
doesn´t seem to work (but that´s not a grappelli-issue).
settings this to "invalid" for now. please re-open this ticket if you think 
it´s a grappelli-issue and if you can offer more details.

Original comment by sehmaschine on 15 Sep 2010 at 11:28

GoogleCodeExporter commented 9 years ago
I have the same problem. I think is related to displaying strings with unicode 
characters, but I'm not sure, because I have returned plain names for 
object_names and I still get it.

Request Method: POST
Request URL:    http://www1.cmediere.ro/admin/faqs/faq/
Django Version: 1.2.5
Exception Type: TemplateSyntaxError
Exception Value:    Caught KeyError while rendering: u'objects_name'
Exception 
Location:   /usr/local/lib/python2.6/dist-packages/django/template/context.py in 
__getitem__, line 46
Python Executable:  /usr/bin/python
Python Version: 2.6.6
Python 
Path:   ['/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/django_simple_captcha-0.2.0-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/django_tagging-0.3.1-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/django_mptt-0.3.1-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/django_blog_zinnia-0.6-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/django_profiles-0.2-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/emencia.django.newsletter-0.1-py2.6.egg'
, '/usr/local/lib/python2.6/dist-packages/html2text-2.38-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/tagging-0.2.1-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/xlrd-0.7.1-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/xlwt-0.7.2-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/vobject-0.8.1c-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages/python_dateutil-1.5-py2.6.egg', 
'/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6', 
'/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', 
'/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', 
'/usr/local/lib/python2.6/dist-packages/PIL', 
'/usr/lib/python2.6/dist-packages', '/usr/lib/pymodules/python2.6', 
'/var/www/www1.cmediere.ro']
Server time:    Mie, 16 Feb 2011 12:39:46 +0200

Original comment by gabriel....@gmail.com on 16 Feb 2011 at 10:43

GoogleCodeExporter commented 9 years ago
I managed to fix this by upgrading django to the latest trunk version, but now 
on the list view, I have besides the model name, an object, like this:

Mediatori <verticalsoftware.cmediere.admin.MediatorAdmin object at 0x80e4dd6c>

Original comment by gabriel....@gmail.com on 16 Feb 2011 at 10:55

GoogleCodeExporter commented 9 years ago
I know – that´s a typo (will be fixed with the next update).

Original comment by sehmaschine on 16 Feb 2011 at 11:06