added thumbnails for members
This commit is contained in:
@@ -60,6 +60,7 @@ INSTALLED_APPS = [
|
||||
'taggit',
|
||||
'ckeditor',
|
||||
'ckeditor_uploader',
|
||||
'easy_thumbnails',
|
||||
'rest_framework',
|
||||
'django_filters',
|
||||
'django_static_jquery_ui',
|
||||
@@ -180,3 +181,9 @@ CKEDITOR_CONFIGS = {
|
||||
],
|
||||
}
|
||||
}
|
||||
THUMBNAIL_ALIASES = {
|
||||
'': {
|
||||
'avatar': {'size': (50, 50), 'crop': True},
|
||||
'thumb': {'size': (150, 150), 'crop': True},
|
||||
},
|
||||
}
|
||||
@@ -4,4 +4,5 @@ django-ckeditor
|
||||
Pillow
|
||||
djangorestframework
|
||||
django-static-jquery-ui
|
||||
docutils
|
||||
docutils
|
||||
easy-thumbnails
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
|
||||
{# only thumb and name of member #}
|
||||
|
||||
{% load thumbnail %}
|
||||
<a class="thumbnail member-thumb" style="width:150px;height:150px">
|
||||
{% if member.image %}<img src="{{member.image.url}}" />{% endif %}
|
||||
{% if member.image %}<img src="{{member.image | thumbnail_url:'thumb'}}" />{% endif %}
|
||||
<div class="thumb-layer"><div><h1>{{member.nickname}}</h1> <p>{{member.firstname}} {{member.surname}}</p></div></div>
|
||||
</a>
|
||||
@@ -1,9 +1,10 @@
|
||||
{# This template shows one member and all the details (that are ment for public) including a list of current jobs #}
|
||||
|
||||
{% load thumbnail %}
|
||||
<div class="media-object">
|
||||
<div class="media-object-section">
|
||||
<div class="thumbnail">
|
||||
<img src= "{{member.image.url}}" style="width:150px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-object-section main-section">
|
||||
@@ -15,3 +16,4 @@ Beschreibung: {{member.description|safe}} </br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user