Skip to content

Commit a1abc7f

Browse files
robinheidrichwilliamdes
authored andcommitted
Rename imgname to preview_image_path
Imported from #186
1 parent d0c9344 commit a1abc7f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

files/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ def __str__(self):
437437
return '{0} {1}'.format(self.display_name, self.version)
438438

439439
@property
440-
def imgname(self):
440+
def preview_image_path(self):
441441
filepath = 'images/themes/{0}.png'.format(self.name)
442-
imagePath = settings.STATIC_ROOT + '/' + filepath;
442+
imagePath = settings.STATIC_ROOT + '/' + filepath
443443

444444
if os.path.exists(imagePath):
445445
return filepath

pmaweb/templates/themes.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ <h2>Available Themes</h2>
4848
<h3 class="card-title">{{ theme }}</h3>
4949
</div>
5050
<div class="card-body">
51-
{% if theme.imgname %}
51+
{% if theme.preview_image_path %}
5252
<div class="pull-right thumbnail">
53-
<a href="{% static theme.imgname %}" class="colorbox" title="{{theme.name}} theme">
54-
<img src="{% static theme.imgname %}" alt="{{theme.display_name}} thumbnail" class="themeimg" />
53+
<a href="{% static theme.preview_image_path %}" class="colorbox" title="{{theme.name}} theme">
54+
<img src="{% static theme.preview_image_path %}" alt="{{theme.display_name}} thumbnail" class="themeimg" />
5555
</a>
5656
</div>
5757
{% endif %}

0 commit comments

Comments
 (0)