mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-21 16:51:08 +02:00
Merge remote-tracking branch 'origin/main' into nl/2975-domain-and-domain-info-portfolio-fields
This commit is contained in:
commit
d6f4b71011
85 changed files with 8552 additions and 5220 deletions
|
@ -244,25 +244,6 @@ class BaseExport(ABC):
|
|||
def get_model_annotation_dict(cls, **kwargs):
|
||||
return convert_queryset_to_dict(cls.get_annotated_queryset(**kwargs), is_model=False)
|
||||
|
||||
@classmethod
|
||||
def export_data_to_csv(cls, csv_file, **kwargs):
|
||||
"""
|
||||
All domain metadata:
|
||||
Exports domains of all statuses plus domain managers.
|
||||
"""
|
||||
writer = csv.writer(csv_file)
|
||||
columns = cls.get_columns()
|
||||
models_dict = cls.get_model_annotation_dict(**kwargs)
|
||||
|
||||
# Write to csv file before the write_csv
|
||||
cls.write_csv_before(writer, **kwargs)
|
||||
|
||||
# Write the csv file
|
||||
rows = cls.write_csv(writer, columns, models_dict)
|
||||
|
||||
# Return rows that for easier parsing and testing
|
||||
return rows
|
||||
|
||||
@classmethod
|
||||
def write_csv(
|
||||
cls,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue