from django.core.urlresolvers import reverse

def get_absolute_url(self):
    """Construct the absolute URL for this Item."""
return reverse('project.app.views.view_name', None, [str(self.id)])
How to generate urls in django