add event_place to fetmeeting admin and template

This commit is contained in:
2021-06-24 13:01:58 +00:00
parent 0db9aed0b7
commit 3c893bcfba
9 changed files with 45 additions and 21 deletions

View File

@@ -57,15 +57,16 @@ def index(request):
if not year and month:
messages.info(
request,
"Es kann nicht nur nach einem Monat gesucht werden."
request, "Es kann nicht nur nach einem Monat gesucht werden."
)
posts = deque(Post.objects.get_date_filtered_list(year, month, fet_meeting_only))
posts = deque(
Post.objects.get_date_filtered_list(year, month, fet_meeting_only)
)
else:
form = PostSearchForm()
posts = deque(Post.objects.get_date_sorted_list())
if posts:
taglist = map(lambda post: post.tags, posts)
@@ -79,6 +80,7 @@ def index(request):
return render(request, "posts/index.html", context)
def calendar(request):
"Kalender Ansicht ICS zur Verknüpfung mit Outlook"
events = deque(Post.objects.get_all_posts_with_date())
@@ -129,6 +131,7 @@ def __get_post_object(id=None):
return post
def show(request, id=None):
p = __get_post_object(id)
@@ -193,7 +196,9 @@ def show(request, id=None):
def show_pdf(request, html, filename):
rendered = render_to_string(settings.BASE_DIR + "/templates/posts/pdf/template.html")
rendered = render_to_string(
settings.BASE_DIR + "/templates/posts/pdf/template.html"
)
# get body-content from pdf template
rendered = rendered.split("<html>")[1]
@@ -208,10 +213,10 @@ def show_pdf(request, html, filename):
if not pdf:
raise Http404("can't create pdf file")
response = HttpResponse(pdf, content_type='application/pdf')
response = HttpResponse(pdf, content_type="application/pdf")
content = "inline; filename=%s" % filename
response['Content-Disposition'] = content
response["Content-Disposition"] = content
return response