from __future__ import unicode_literals

from django.core.urlresolvers import reverse
from django.db import models
import generic_scaffold

class Book(models.Model):
    title = models.CharField(max_length=128)
    author = models.CharField(max_length=128)
    category = models.CharField(max_length=32)

    def get_absolute_url(self):
        return reverse(self.detail_url_name, args=[self.id])

@@ -34,16 +34,25 @@
 terals%0A%0A
+try:%0A    
 from dja
@@ -88,16 +88,81 @@
 reverse%0A
+except ModuleNotFoundError:%0A    from django.urls import reverse%0A%0A
 from dja
@@ -465,8 +465,108 @@
 lf.id%5D)%0A
+%0A    def __str__(self):%0A        return '%7B0%7D %7B1%7D %7B2%7D'.format(self.title, self.author, self.category)%0A

Add support for django 2 to example project