mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Put templates on service model
We do a lot of logic around choosing which templates to show. This logic is all inside one view method. It makes it cleaner to break this logic up into functions. But this would mean passing around variables from one function to another. Putting these methods onto a class (the service model) means that there’s a place to store this data (rather than having to pass it around a lot). Making this code more manageable is important so that when we have templates and folders it’s easy to encapsulate the logic around combining the two.
This commit is contained in:
@@ -72,7 +72,6 @@ def service_dashboard(service_id):
|
||||
return render_template(
|
||||
'views/dashboard/dashboard.html',
|
||||
updates_url=url_for(".service_dashboard_updates", service_id=service_id),
|
||||
templates=service_api_client.get_service_templates(service_id)['data'],
|
||||
partials=get_dashboard_partials(service_id)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user