Skip to content

Instantly share code, notes, and snippets.

@dmitrii-kalashnikov
Created January 9, 2019 22:31
Show Gist options
  • Save dmitrii-kalashnikov/1cb79685fccd434abbac7281f492bcc0 to your computer and use it in GitHub Desktop.
Save dmitrii-kalashnikov/1cb79685fccd434abbac7281f492bcc0 to your computer and use it in GitHub Desktop.
{% block content %}
<h1 class='mb-5'> </h1>
<div class="card mb-5" style="width:400px; border-radius: 8px;">
{% if post.image %}
<img class="img-responsive" src="{{ post.image.thumbnail.400x400 }}" style="border-radius: 8px;" alt="Card image" font-size:8px;>
{% endif %}
<div class="card-body">
<h4 class="card-title">{{ post.title }}</h4>
<p class="card-text">{{ post.body1 }}</p>
<p class="card-text">{{ post.body2 }}</p>
<p class="card-text">{{ post.body3 }}</p>
<p class="card-text">{{ post.body4 }}</p>
<p class="card-text">{{ post.body5 }}</p>
<p class="card-text">{{ post.body6 }}</p>
<p class="card-text">{{ post.body7 }}</p>
<p class="card-text">{{ post.body8 }}</p>
<div class="card-footer text-muted">
Author: {{ post.user }}
</div>
</div>
{% if user.is_authenticated %}
{% if post not in p %}
<a href="{{ post.get_save_url }}"><i class="fa fa-bookmark-o fa-lg" aria-hidden="true"> </i> Bookmark</a>
{% else %}
<a><i class="fa fa-bookmark fa-lg" aria-hidden="true"> </i> Saved </a>
<hr>
<a href="{{ post.get_del_url }}">Del bookmark</a>
<hr>
{% endif %}
{% if post in p %}
{% endif %}
{% if post.user == request.user %}
<a href="{{ post.get_delete_url }}"> Delete the review </a>
{% endif %}
{% endif %}
</div>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment