1 from django.db import models
\r
2 from django.utils.translation import ugettext_lazy as _
\r
4 class Library(models.Model):
\r
5 """Represent a single library in the libraries dictionary"""
\r
7 #slug = models.SlugField(_('slug'), max_length=120, unique=True, db_index=True)
\r
8 name = models.CharField(_('name'), max_length=120, blank=True)
9 url = models.CharField(_('url'), max_length=120, blank=True)
10 description = models.TextField(_('description'), blank=True)
\r
13 verbose_name = _('library')
\r
14 verbose_name_plural = _('libraries')
\r
16 def __unicode__(self):
\r
20 def get_absolute_url(self):
\r
21 return ('infopage', [self.slug])
\r