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 name = models.CharField(_('name'), max_length = 120, blank = True)
8 url = models.CharField(_('url'), max_length = 120, blank = True)
9 description = models.TextField(_('description'), blank = True)
\r
12 verbose_name = _('library')
\r
13 verbose_name_plural = _('libraries')
\r
15 def __unicode__(self):
\r
19 def get_absolute_url(self):
\r
20 return ('infopage', [self.slug])
\r