summaryrefslogtreecommitdiff
path: root/app/posts
diff options
context:
space:
mode:
Diffstat (limited to 'app/posts')
-rw-r--r--app/posts/admin.py2
-rw-r--r--app/posts/migrations/0020_remove_post_issue.py17
-rw-r--r--app/posts/models.py9
3 files changed, 18 insertions, 10 deletions
diff --git a/app/posts/admin.py b/app/posts/admin.py
index 8346c62..22c7955 100644
--- a/app/posts/admin.py
+++ b/app/posts/admin.py
@@ -45,7 +45,7 @@ class PostAdmin(OSMGeoAdmin):
('title', 'short_title'),
'subtitle',
'body_markdown',
- ('pub_date', 'status', 'post_type', 'issue'),
+ ('pub_date', 'status', 'post_type'),
('slug', 'enable_comments',),
'point',
'dek',
diff --git a/app/posts/migrations/0020_remove_post_issue.py b/app/posts/migrations/0020_remove_post_issue.py
new file mode 100644
index 0000000..aa5695c
--- /dev/null
+++ b/app/posts/migrations/0020_remove_post_issue.py
@@ -0,0 +1,17 @@
+# Generated by Django 4.0.6 on 2022-07-23 16:29
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('posts', '0019_auto_20210323_2155'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='post',
+ name='issue',
+ ),
+ ]
diff --git a/app/posts/models.py b/app/posts/models.py
index 21dd6d5..4616ad5 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -94,7 +94,6 @@ class Post(models.Model):
originally_published_by_url = models.CharField(max_length=400, null=True, blank=True)
field_notes = models.ManyToManyField('self', blank=True, symmetrical=False, limit_choices_to = {'post_type': PostType.FIELD_NOTE})
books = models.ManyToManyField(Book, blank=True)
- issue = models.PositiveIntegerField(null=True)
class Meta:
ordering = ('-pub_date',)
@@ -126,14 +125,6 @@ class Post(models.Model):
def get_content_type(self):
return ContentType.objects.get(app_label="posts", model="post")
- def get_issue_str(self):
- issue = self.issue
- if self.issue < 100:
- issue = "0%s" % self.issue
- if self.issue < 10:
- issue = "00%s" % self.issue
- return issue
-
@property
def get_previous_published(self):
return self.get_previous_by_pub_date(status__exact=1,post_type=self.post_type)