Gauravwagh / django-grappelli

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

Grappelli doesn't work with non-int ids #394

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which DJANGO-VERSION are you using?
1.3

Which GRAPPELLI-VERSION are you using?
Dev

Which BROWSER (including the version) are you using?
Everyone

What steps will reproduce the problem?
1. Use whatever kind of non integer primary key
2. You'll have to fix some %d problems in templates 
3. You'll have to fix js

What is the expected output? What do you see instead?

Please provide any additional information below.

Original issue reported on code.google.com by luca.gia...@gmail.com on 13 Nov 2011 at 8:47

GoogleCodeExporter commented 9 years ago
fixes (worked in my case) change line 30 of grappelli/templatetags/grp_tags.py 
to:

return_string = "%s'%s': {pk: '%s', app: '%s', model: '%s'}," % (return_string, 
c.id, c.id, c.app_label, c.model)

Original comment by luca.gia...@gmail.com on 13 Nov 2011 at 8:52