summaryrefslogtreecommitdiff
path: root/apps/links/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'apps/links/models.py')
-rw-r--r--apps/links/models.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/apps/links/models.py b/apps/links/models.py
index e8fee43..09acc1c 100644
--- a/apps/links/models.py
+++ b/apps/links/models.py
@@ -4,9 +4,7 @@ from django.db import models
from django.contrib.syndication.feeds import Feed
from django.contrib.sitemaps import Sitemap
-from tagging.fields import TagField
-from tagging.models import Tag
-
+from taggit.managers import TaggableManager
RATINGS = (
('1', "1 Star"),
@@ -19,20 +17,19 @@ RATINGS = (
DEBUG = 1
class Link(models.Model):
+ link_id = models.CharField(max_length=60, blank=True, null=True)
title = models.CharField(max_length=400)
- magnolia_id = models.CharField(max_length=60, blank=True, null=True)
url = models.CharField(max_length=400)
description = models.TextField(blank=True, null=True)
- screen_url = models.CharField(max_length=400, blank=True)
- rating = models.CharField(max_length=1, choices=RATINGS)
+ screen_url = models.CharField(max_length=400, blank=True, null=True)
+ rating = models.CharField(max_length=1, choices=RATINGS, null=True)
pub_date = models.DateTimeField()
- enable_comments = models.NullBooleanField(default=False)
PUB_STATUS = (
(0, 'Private'),
(1, 'Public'),
)
status = models.IntegerField(choices=PUB_STATUS, default=0)
- tags = TagField()
+ tags = TaggableManager(blank=True)
class Meta:
ordering = ['-pub_date']
@@ -52,8 +49,6 @@ class Link(models.Model):
def get_next_published(self):
return self.get_next_by_pub_date(status__exact=1)
- def get_tags(self):
- return Tag.objects.get_for_object(self)
def get_thumbnail_url(self):
return "http://images.luxagraf.net/magnolia_thumbs/%s" %(self.screen_url)