summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/links/admin.py5
-rw-r--r--app/links/models.py3
-rw-r--r--app/links/retriever.py2
3 files changed, 1 insertions, 9 deletions
diff --git a/app/links/admin.py b/app/links/admin.py
index cbfbc52..4c3f613 100644
--- a/app/links/admin.py
+++ b/app/links/admin.py
@@ -5,7 +5,7 @@ from links.models import Link
class LinkAdmin(admin.ModelAdmin):
- list_display = ('title', 'admin_link', 'rating', 'pub_date', 'status')
+ list_display = ('title', 'admin_link', 'pub_date', 'status')
search_fields = ['title', 'description', 'url']
list_filter = ['rating', 'status', TagListFilter]
fieldsets = (
@@ -14,14 +14,11 @@ class LinkAdmin(admin.ModelAdmin):
'title',
'url',
'description',
- 'rating'
)
}),
('Details', {
'fields': (
- 'screen_url',
'pub_date',
- 'link_id',
'tags',
'status'
),
diff --git a/app/links/models.py b/app/links/models.py
index cdfd786..2c3480f 100644
--- a/app/links/models.py
+++ b/app/links/models.py
@@ -18,12 +18,9 @@ RATINGS = (
class Link(models.Model):
- link_id = models.CharField(max_length=60, blank=True, null=True)
title = models.CharField(max_length=400)
url = models.CharField(max_length=400)
description = models.TextField(blank=True, null=True)
- 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()
PUB_STATUS = (
(0, 'Private'),
diff --git a/app/links/retriever.py b/app/links/retriever.py
index 843487a..59b90ec 100644
--- a/app/links/retriever.py
+++ b/app/links/retriever.py
@@ -23,10 +23,8 @@ def sync_pinboard_links():
except ObjectDoesNotExist:
l, created = Link.objects.get_or_create(
title=link['description'],
- link_id=link['hash'],
url=link['href'],
description=link['extended'],
- rating="3",
pub_date=datetime.datetime.strptime(link['time'], "%Y-%m-%dT%H:%M:%SZ"),
status=0
)