+\r
+class Catalog(models.Model):\r
+ """Represents a dictionary of libraries"""\r
+\r
+ name = models.CharField(_('name'), max_length=120, null=False)\r
+ slug = models.SlugField(_('slug'), max_length=120, unique=True, db_index=True)\r
+\r
+ class Meta:\r
+ verbose_name = _('catalog')\r
+ verbose_name_plural = _('catalogs')\r
+\r
+ def __unicode__(self):\r
+ return self.name\r
+\r
+ @models.permalink\r
+ def get_absolute_url(self):\r
+ return ('libraries_catalog_view', [self.slug])\r
+\r
+\r