I'm trying to make a custom view in Django admin. I'm reading from this site, Simple Django Admin Preview, but I have a problem:
ValueError: invalid literal for int() with base 10: '13/preview'
Here is my url.py:
url(r'^admin/diligencias/diligencia/(?P<object_id>\d+)/preview/$','preview'),
Here is my view.py:
@staff_member_required
def preview(request, object_id):
return object_detail(request, object_id=object_id,queryset=Diligencia.objects.all(), template_object_name = 'diligencia', )
What does this error mean?