HTTPS
This commit is contained in:
Holger Trampe 2019-12-16 22:45:03 +01:00
parent ee353c0675
commit f3f3217659
4 changed files with 8 additions and 3 deletions

View File

@ -30,4 +30,10 @@ class QuickLinks(models.Model):
def get_absolute_url(self):
return reverse('ql-update', kwargs={'pk':self.pk})
@property
def get_photo_url(self):
if self.logo and hasattr(self.logo, 'url'):
return self.logo.url
else:
return "/media/agencymain/default.jpg"

View File

@ -33,8 +33,8 @@
{% for ql in quicklinks %}
<tr>
<td>{{ql.name }}</td>
<td><a href="https://{{ ql.link }}" target="_blank">{{ ql.link }}</a></td>
<td><img src="{{ ql.logo }}"></td>
<td><a href="{{ ql.link }}" target="_blank">{{ ql.link }}</a></td>
<td><img src="{{ ql.get_photo_url }}"></td>
<td>
{% if perms.users.ql_management %}
<div class="dropdown no-arrow">

View File

@ -8,7 +8,6 @@
{% csrf_token %}
{{ form|crispy }}
<hr>
<button type="submit" class="btn btn-success">Quicklink aktualisieren</button>&nbsp;
<a class="btn" href="{% url 'ql-management' %} ">Abbrechen</a>
</form>