Commits

Denis Darii committed e155d0f

added Satellite model

  • Participants
  • Parent commits 175c0dd

Comments (0)

Files changed (1)

 from django.db import models
+from django.utils.translation import ugettext as _
+from django.contrib.auth.models import User
 
-# Create your models here.
+
+class Satellite(models.Model):
+    note = models.CharField(_('name'), max_length=200, blank=True, null=True)
+    user = models.ForeignKey(User, verbose_name=_('user'),
+                    blank=True, null=True)
+    url = models.URLField(_("url"), blank=True)
+
+    enabled = models.BooleanField(default=False, editable=False)
+    modified = models.DateTimeField(auto_now=True, editable=False)
+    created = models.DateTimeField(auto_now_add=True, editable=False)
+
+    def __unicode__(self):
+        return '%s %s' % (self.user, self.url)
+
+    class Meta():
+        verbose_name = _('satellite')
+        verbose_name_plural = _('satellites')