from django.db.models import permalink

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