Skip to content

Commit

Permalink
Merge branch 'master' into old_state
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos authored Jun 22, 2017
2 parents 4b807f8 + 4b1f2e8 commit 973f71f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions conf/buildout-dev.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ entry-points = convertit=pyramid.scripts.pserve:main

[versions]
pydot = 1.1.0
django-debug-toolbar = 1.3.2
django-extensions = 1.6.7
django-debug-toolbar = 1.8
django-extensions = 1.7.9
14 changes: 7 additions & 7 deletions conf/buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ zc.buildout = 1.7.1
#
# From Geotrek
#
Django = 1.8.17
mapentity = 3.1.0
Django = 1.8.18
mapentity = 3.1.4
GDAL=1.10.0
tif2geojson=0.1.3
django-extended-choices = 0.3.0
Expand All @@ -108,28 +108,28 @@ django-appypod = 1.0.0
django-screamshot = 0.7.0
gpxpy = 0.9.8
BeautifulSoup4 = 4.5.3
requests = 2.12.4
requests = 2.18.1
django-modeltranslation = 0.8.1
django-shapes = 0.2.0
django-floppyforms = 1.1.1
django-crispy-forms = 1.4.0
django-compressor = 1.6
django-filter = 1.0.1
django-filter = 1.0.4
easy-thumbnails = 1.4
django-tinymce = 2.4.0
psycopg2 = 2.6.2
docutils = 0.11
Pillow = 2.5.0
easy-thumbnails = 1.4
simplekml = 1.3.0
djangorestframework = 3.5.3
djangorestframework-gis = 0.11
djangorestframework = 3.6.3
djangorestframework-gis = 0.11.2
django-embed-video = 0.11
xlrd = 0.9.3
landez = 2.4.0
bpython = 0.14
cffi = 1.1.2
WeasyPrint = 0.34
WeasyPrint = 0.36
django-weasyprint = 0.1
lxml = 3.4.4
celery = 3.1.23
Expand Down
6 changes: 2 additions & 4 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ CHANGELOG
2.14.1.dev0
-----------

**Minor changes**
**Bug fixes**

* Refactor signals pre / post migrate according Django 1.8
* Update translations

**Bug fixes**

* Fix path splitting
* Fix AutoLogin Middleware with mapentity 3.1.4


2.14.0
Expand Down
6 changes: 3 additions & 3 deletions geotrek/common/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def pictures(self):
"""
if hasattr(self, '_pictures'):
return self._pictures
all_attachments = self.attachments.order_by('-starred', 'attachment_file').all()
all_attachments = self.attachments.all().order_by('-starred', 'attachment_file')
return [a for a in all_attachments if a.is_image and a.title != 'mapimage']

@pictures.setter
Expand Down Expand Up @@ -170,7 +170,7 @@ def serializable_thumbnail(self):

@property
def videos(self):
all_attachments = self.attachments.order_by('-starred')
all_attachments = self.attachments.all().order_by('-starred')
return all_attachments.exclude(attachment_video='')

@property
Expand All @@ -193,7 +193,7 @@ def serializable_videos(self):

@property
def files(self):
all_attachments = self.attachments.order_by('-starred')
all_attachments = self.attachments.all().order_by('-starred')
all_attachments = all_attachments.exclude(attachment_file='')
return [a for a in all_attachments if not a.is_image]

Expand Down
4 changes: 2 additions & 2 deletions geotrek/trekking/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,10 @@ class TrekViewSet(MapEntityViewSet):

def get_queryset(self):
qs = self.model.objects.existing()
qs = qs.select_related('structure',)
qs = qs.select_related('structure', 'difficulty', 'practice', 'route')
qs = qs.prefetch_related(
'networks', 'source', 'portal', 'web_links', 'accessibilities', 'themes', 'aggregations',
'information_desks',
'information_desks', 'attachments',
Prefetch('trek_relationship_a', queryset=TrekRelationship.objects.select_related('trek_a', 'trek_b')),
Prefetch('trek_relationship_b', queryset=TrekRelationship.objects.select_related('trek_a', 'trek_b')),
Prefetch('trek_children', queryset=OrderedTrekChild.objects.select_related('parent', 'child')),
Expand Down

0 comments on commit 973f71f

Please sign in to comment.