mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
lint changes
This commit is contained in:
parent
b679108215
commit
252fa2e757
2 changed files with 3 additions and 5 deletions
|
@ -52,8 +52,6 @@ from waffle.testutils import override_flag
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from django.contrib.admin.models import LogEntry, ADDITION
|
from django.contrib.admin.models import LogEntry, ADDITION
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.utils import timezone
|
|
||||||
from waffle.testutils import override_flag
|
|
||||||
|
|
||||||
|
|
||||||
class CsvReportsTest(MockDbForSharedTests):
|
class CsvReportsTest(MockDbForSharedTests):
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
"""
|
"""
|
||||||
Model annotation classes.
|
Model annotation classes.
|
||||||
|
|
||||||
Intended to return django querysets with computed fields for api endpoints and our csv reports.
|
Intended to return django querysets with computed fields for api endpoints and our csv reports.
|
||||||
Used by both API endpoints (e.g. portfolio members JSON) and data exports (e.g. CSV reports).
|
Used by both API endpoints (e.g. portfolio members JSON) and data exports (e.g. CSV reports).
|
||||||
|
|
||||||
Initially created to manage the complexity of the MembersTable and Members CSV report,
|
Initially created to manage the complexity of the MembersTable and Members CSV report,
|
||||||
as they require complex but common annotations.
|
as they require complex but common annotations.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
# For a JSON table endpoint
|
# For a JSON table endpoint
|
||||||
permissions = UserPortfolioPermissionAnnotation.get_annotated_queryset(portfolio)
|
permissions = UserPortfolioPermissionAnnotation.get_annotated_queryset(portfolio)
|
||||||
# Returns queryset with standardized fields for member tables
|
# Returns queryset with standardized fields for member tables
|
||||||
|
|
||||||
# For a CSV export
|
# For a CSV export
|
||||||
permissions = UserPortfolioPermissionAnnotation.get_annotated_queryset(portfolio, csv_report=True)
|
permissions = UserPortfolioPermissionAnnotation.get_annotated_queryset(portfolio, csv_report=True)
|
||||||
# Returns same fields but formatted for CSV export
|
# Returns same fields but formatted for CSV export
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue