Add DASHBOARD_PAGE_SIZE to settings
Add DASHBOARD_PAGE_SIZE to TEMPLATE.env and app.json Parse dashboard page size value
This commit is contained in:
committed by
R. Miles McCain
parent
b44642e023
commit
d66f683104
@@ -25,7 +25,7 @@ from .mixins import DateRangeMixin
|
||||
class DashboardView(LoginRequiredMixin, DateRangeMixin, ListView):
|
||||
model = Service
|
||||
template_name = "dashboard/pages/dashboard.html"
|
||||
paginate_by = 5
|
||||
paginate_by = settings.DASHBOARD_PAGE_SIZE
|
||||
|
||||
def get_queryset(self):
|
||||
return Service.objects.filter(
|
||||
|
||||
@@ -347,3 +347,6 @@ AGGRESSIVE_HASH_SALTING = os.getenv("AGGRESSIVE_HASH_SALTING", "False") == "True
|
||||
|
||||
# What location url should be linked to in the frontend?
|
||||
LOCATION_URL = os.getenv("LOCATION_URL", "https://www.openstreetmap.org/?mlat=$LATITUDE&mlon=$LONGITUDE")
|
||||
|
||||
# How many services should be displayed on dashboard page?
|
||||
DASHBOARD_PAGE_SIZE = int(os.getenv("DASHBOARD_PAGE_SIZE", "5"))
|
||||
|
||||
Reference in New Issue
Block a user