Skip to content

Commit

Permalink
Refactor of statistics code (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
anorthall committed Jun 20, 2023
1 parent 36fc9a0 commit 3b6867d
Show file tree
Hide file tree
Showing 23 changed files with 487 additions and 1,306 deletions.
146 changes: 0 additions & 146 deletions app/logger/charts.py

This file was deleted.

12 changes: 0 additions & 12 deletions app/logger/charts_urls.py

This file was deleted.

5 changes: 4 additions & 1 deletion app/logger/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def get_context_data(self, *args, **kwargs):
return context


# noinspection PyAttributeOutsideInit
class ViewableObjectDetailView(DetailView):
"""A DetailView that considers permissions for objects like Trip and TripReport"""

Expand All @@ -59,6 +60,7 @@ def get(self, request, *args, **kwargs):
return self.render_to_response(context)


# noinspection PyAttributeOutsideInit
class ReportObjectMixin:
"""Mixin to get report objects from a Trip UUID"""

Expand All @@ -84,7 +86,8 @@ def __init__(self, *args, **kwargs):

instance = kwargs.get("instance", None)
if not instance:
return super().__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
return

distance_fields = [
"horizontal_dist",
Expand Down
Loading

0 comments on commit 3b6867d

Please sign in to comment.