Skip to content

Commit

Permalink
Merge branch 'feature/Thumbnail' into develop, fixed #1
Browse files Browse the repository at this point in the history
  • Loading branch information
yrchen committed Mar 12, 2016
2 parents 99e4223 + b8b01f8 commit 007fbc2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
6 changes: 4 additions & 2 deletions commonrepo/templates/elos/elos_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@
<!-- ELO Cover Box -->
<div class="box box-primary">
<div class="box-body box-profile">
{% if object.logo %}
<img class="img-responsive center-block" src="{% thumbnail object.logo 250x250 crop %}" alt="Group {{ object.name }} logo"/>
{% if object.cover %}
{% thumbnail object.cover "250x250" format="PNG" as cover %}
<img class="img-responsive center-block" src="{{ cover.url }}" alt="Group {{ object.name }} logo"/>
{% endthumbnail %}
{% else %}
<div class="text-center">
<i class="fa fa-users fa-5x"></i>
Expand Down
4 changes: 3 additions & 1 deletion commonrepo/templates/groups/groups_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
<div class="box box-primary">
<div class="box-body box-profile">
{% if object.logo %}
<img class="img-responsive center-block" src="{% thumbnail object.logo 250x250 crop %}" alt="Group {{ object.name }} logo"/>
{% thumbnail object.logo "250x250" format="PNG" as logo %}
<img class="img-responsive center-block" src="{{ logo.url }}" alt="Group {{ object.name }} logo"/>
{% endthumbnail %}
{% else %}
<div class="text-center">
<i class="fa fa-users fa-5x"></i>
Expand Down
3 changes: 1 addition & 2 deletions config/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@
'haystack', # django-haystack

# Other tools
'easy_thumbnails', # easy-thumbnails (required by django-filer)
#'filer', # django-filer
'mptt', # django-mptt
'avatar', # django-avatar
'annoying', # django-annoying
Expand All @@ -107,6 +105,7 @@
'licenses', # django-licenses
'gargoyle', # gargoyle-yplan
'robots', # django-rebots
'sorl.thumbnail', # sorl-thumbnail
)

# Apps specific for this project go here.
Expand Down
3 changes: 3 additions & 0 deletions config/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,6 @@
}

OAUTH2_CLIENT_ID_GOOGLE = "205004874679-sce0aiev2rgvu41sjve3fpeqqb85cfeq.apps.googleusercontent.com"

# sorl-thumbnail
THUMBNAIL_DEBUG = True
4 changes: 4 additions & 0 deletions config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,7 @@
# Your production stuff: Below this line define 3rd party library settings

OAUTH2_CLIENT_ID_GOOGLE = env('OAUTH2_CLIENT_ID_GOOGLE')

# sorl-thumbnail workaround for S3 performance issue
# See: https://github.com/mariocesar/sorl-thumbnail/issues/351
THUMBNAIL_FORCE_OVERWRITE = True
3 changes: 0 additions & 3 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
# Documents
url(r'^api/docs/', include('rest_framework_swagger.urls')), # django-rest-swagger

# Files
#url(r'^files/', include('filer.urls')),

# Search
url(r'^search/', include('haystack.urls'), name="search"), # django-haystack

Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ django-reversion-compare==0.5.6
django-licenses==0.2.5
django-grappelli==2.7.2
django-filebrowser==3.6.1
django-filer==1.1.0
django-rest-swagger==0.3.5
django-robots==2.0
gargoyle-yplan==1.2.1
sorl-thumbnail==12.3

# Authentication
djoser==0.4.0
Expand Down

0 comments on commit 007fbc2

Please sign in to comment.