diff --git a/deployment/nginx.conf b/deployment/nginx.conf index bd4bc238..11673ccb 100644 --- a/deployment/nginx.conf +++ b/deployment/nginx.conf @@ -3,7 +3,12 @@ server { location /assets { alias /app/assets; - try_files $uri $uri/ =404; + try_files $uri =404; + } + + location /files { + alias /app/files; + try_files $uri =404; } location /fotos { diff --git a/fet2020/posts/serializers.py b/fet2020/posts/serializers.py index c9714953..c5051e14 100644 --- a/fet2020/posts/serializers.py +++ b/fet2020/posts/serializers.py @@ -21,6 +21,7 @@ class PostSerializer(serializers.HyperlinkedModelSerializer): 'event_start', 'event_end', 'is_hidden', - 'agenda_html' + 'agenda_html', + 'has_agenda', # 'author', ] diff --git a/fet2020/posts/views.py b/fet2020/posts/views.py index 6349e7fb..b0c5c209 100644 --- a/fet2020/posts/views.py +++ b/fet2020/posts/views.py @@ -38,9 +38,9 @@ def tags(request, tag=""): featured_post = Post.objects.get_visible_articles().filter(slug=tag).first() members = [] - job_names, slug_list = JobMember.jobs.get_job_names(slug=tag) + #job_names, slug_list = JobMember.jobs.get_job_names(slug=tag) - if job_names: + if None: active_members = JobMember.active_member.get_members_of_job(job_names=job_names) for idx, item in enumerate(job_names): @@ -60,7 +60,7 @@ def tags(request, tag=""): "posts": posts, "author_image": author_image, "featured_post": featured_post, - "members": members, + "members": None, "tags_list": None, } diff --git a/fet2020/templates/posts/show.html b/fet2020/templates/posts/show.html index 450710f5..e65d57cc 100644 --- a/fet2020/templates/posts/show.html +++ b/fet2020/templates/posts/show.html @@ -34,35 +34,11 @@
-
+

{{ post.title|tags_to_url }}

+ {{ post.subtitle|default_if_none:" "|tags_to_url }} +
+
-

{{ post.title|tags_to_url }}

- {{ post.subtitle|default_if_none:" "|tags_to_url }} - -
- Nächster Artikel
- -
- {% include 'posts/partials/_date_box.html' %} -
- - Start: {{ post.event_start }}
- Ende: {{ post.event_end }}
- - {% if request.user.is_authenticated %} - - {% if post.has_agenda %} - Agenda
- {% endif %} - - {% if post.has_protocol %} - Protokoll - {% endif %} - -
------
- Bearbeiten - {% endif %} -
{% for tag in post.get_tagnames %} {{ tag|tags_to_url }} @@ -77,6 +53,25 @@ {{ post.body|safe|add_internal_links|tags_to_url }}
+
+ {% if request.user.is_authenticated %} + + {% if post.has_agenda %} + Agenda
+ {% endif %} + + {% if post.has_protocol %} + Protokoll + {% endif %} + + {% endif %} + + Start: {{ post.event_start }}
+ Ende: {{ post.event_end }}
+ Nächster Artikel
+ {% include 'posts/partials/_date_box.html' %} +
+
@@ -87,4 +82,4 @@ {% endfor %}
-{% endblock %} \ No newline at end of file +{% endblock %}