chronhq / backend

Backend for database. Python, Django, PostGIS
https://maps.chron.ist/
GNU General Public License v3.0
6 stars 1 forks source link

Features for courses #180

Closed MiklerGM closed 4 years ago

MiklerGM commented 4 years ago

Reduced number of endpoints for MVT tiles - less requests from user, more options to cache data

Use ordered list to retrieve start_date and end_date for narratives fix #119

Dump and load commands for database

MiklerGM commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build failed

MiklerGM commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build failed

quorth0n commented 4 years ago

@MiklerGM I think the reason the build is failing is because of the formatting check, you can use make lint

+++ api/serializers.py  2019-11-27 20:37:18.727289 +0000
@@ -219,19 +219,23 @@
     def get_start_year(self, obj):  # pylint: disable=R0201
         """
         Retrieves year of first narration in set
         """
         if obj.narration_set.first() is not None:
-            return jd2gcal(obj.narration_set.order_by('map_datetime').first().map_datetime, 0)[0]
+            return jd2gcal(
+                obj.narration_set.order_by("map_datetime").first().map_datetime, 0
+            )[0]
         return None

     def get_end_year(self, obj):  # pylint: disable=R0201
         """
         Retrieves year of last narration in set
         """
         if obj.narration_set.last() is not None:
-            return jd2gcal(obj.narration_set.order_by('map_datetime').last().map_datetime, 0)[0]
+            return jd2gcal(
+                obj.narration_set.order_by("map_datetime").last().map_datetime, 0
+            )[0]
         return None

     def get_votes(self, obj):  # pylint: disable=R0201
         """
         Returns dict of upvotes and downvotes
would reformat api/serializers.py
Oh no! 💥 💔 💥
1 file would be reformatted, 28 files would be left unchanged.
The command "docker-compose run --entrypoint black web . --exclude /migrations/ --diff --check" exited with 1.
MiklerGM commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build succeeded