From 05aa3ddf5dcf9b7ff17785106ec465a83a9e3eb4 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 3 Sep 2020 09:02:14 +0000 Subject: [PATCH] make master pep8-ready again --- fet2020/posts/forms.py | 10 ++++++---- fet2020/posts/models.py | 1 - fet2020/posts/views.py | 9 +++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/fet2020/posts/forms.py b/fet2020/posts/forms.py index 5996bad6..77efafa2 100644 --- a/fet2020/posts/forms.py +++ b/fet2020/posts/forms.py @@ -7,7 +7,7 @@ from .models import Post, Event, News, FetMeeting class MyPostForm(forms.ModelForm): class Meta: model = Post - fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author','public_date'] + fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author', 'public_date'] widgets = {'body': CKEditorUploadingWidget(config_name='default')} @@ -21,7 +21,7 @@ class MyPostForm(forms.ModelForm): class MyNewsForm(MyPostForm): class Meta: model = News - fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author','public_date'] + fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author', 'public_date'] widgets = {'body': CKEditorUploadingWidget(config_name='default')} @@ -32,8 +32,10 @@ class MyNewsForm(MyPostForm): class MyEventForm(MyPostForm): class Meta: model = Event - fields = ['title', 'subtitle', 'tags', 'image', 'body', - 'event_start', 'event_end', 'event_place', 'slug', 'author','public_date'] + fields = [ + 'title', 'subtitle', 'tags', 'image', 'body', 'event_start', 'event_end', + 'event_place', 'slug', 'author', 'public_date', + ] widgets = {'body': CKEditorUploadingWidget(config_name='default')} diff --git a/fet2020/posts/models.py b/fet2020/posts/models.py index 279148d2..cfb2a6b9 100644 --- a/fet2020/posts/models.py +++ b/fet2020/posts/models.py @@ -194,7 +194,6 @@ class Post(models.Model): @property def author_member(self): return Member.all_members.filter(nickname=self.author.username).first() - def save(self, *args, **kwargs): "save the post with some defaults" diff --git a/fet2020/posts/views.py b/fet2020/posts/views.py index 70b12e74..4a1d1d9a 100644 --- a/fet2020/posts/views.py +++ b/fet2020/posts/views.py @@ -35,11 +35,12 @@ def index(request): def tags(request, tag=""): posts = deque(Post.objects.filter(tags__name=tag)) featured_post = Post.objects.filter(slug=tag).first() - context= { + context = { "posts": posts, - "featured_post":featured_post, - "tags_list": None} - return render(request, 'posts/tag.html',context) + "featured_post": featured_post, + "tags_list": None, + } + return render(request, 'posts/tag.html', context) def show(request, id=None):