harryprince / django-photologue

Automatically exported from code.google.com/p/django-photologue
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

TemplateSyntaxError when viewing photos in the admin interface #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using the latest version of photologue and django.  I was able to add
a photo using the admin interface just fine, but when I click on the photos
list I get a TemplateSyntaxError:

Caught an exception while rendering: Reverse for 'pl-photo' not found.

Original Traceback (most recent call last):
  File "C:\Python25\lib\site-packages\django\template\debug.py", line 71,
in render_node
    result = node.render(context)
  File "C:\Python25\lib\site-packages\django\template\__init__.py", line
903, in render
    dict = func(*args)
  File
"C:\Python25\lib\site-packages\django\contrib\admin\templatetags\admin_list.py",
line 238, in result_list
    'results': list(results(cl))}
  File
"C:\Python25\lib\site-packages\django\contrib\admin\templatetags\admin_list.py",
line 233, in results
    yield list(items_for_result(cl,res))
  File
"C:\Python25\lib\site-packages\django\contrib\admin\templatetags\admin_list.py",
line 161, in items_for_result
    value = attr()
  File "D:/Projects/personal/outc\photologue\models.py", line 262, in
admin_thumbnail
    (self.get_absolute_url(), func())
  File "C:\Python25\lib\site-packages\django\utils\functional.py", line 55,
in _curried
    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "C:\Python25\lib\site-packages\django\db\models\base.py", line 488,
in get_absolute_url
    return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label,
opts.module_name), func)(self, *args, **kwargs)
  File "D:/Projects/personal/outc\photologue\models.py", line 482, in
get_absolute_url
    return reverse('pl-photo', args=[self.title_slug])
  File "C:\Python25\lib\site-packages\django\core\urlresolvers.py", line
307, in reverse
    *args, **kwargs)))
  File "C:\Python25\lib\site-packages\django\core\urlresolvers.py", line
291, in reverse
    raise NoReverseMatch("Reverse for '%s' not found." % lookup_view)
NoReverseMatch: Reverse for 'pl-photo' not found.

Original issue reported on code.google.com by rambling...@gmail.com on 20 Aug 2008 at 9:41

GoogleCodeExporter commented 9 years ago
You need a url name 'pl-photo'. See here:
http://groups.google.com/group/django-photologue/browse_thread/thread/d10f56b73f
e5db72/2bab4b6f8e2d9e56?lnk=gst&q=pl-photo#2bab4b6f8e2d9e56

Original comment by justin.d...@gmail.com on 20 Aug 2008 at 11:13