Skip to content

Commit

Permalink
#256 order the field list. File name contain the project name
Browse files Browse the repository at this point in the history
  • Loading branch information
yn-coder committed Apr 20, 2021
1 parent 02fbdff commit 5ddd4fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def get(self, request, project_id):
data = project.project2tasks.all().order_by('created_at')

# Write data.
fields = { 'id', 'created_at', 'fullname', 'holder', 'state', 'detailed_state', 'milestone', 'finished_fact_at', 'important', 'kind', 'sub_project' }
fields = ( 'id', 'created_at', 'fullname', 'holder', 'state', 'detailed_state', 'milestone', 'finished_fact_at', 'important', 'kind', 'sub_project' )

#Task._meta.get_fields()
row_num = 0
Expand All @@ -519,7 +519,7 @@ def get(self, request, project_id):
output.seek(0)

# Set up the Http response.
filename = project_id + '.xlsx'
filename = project_id + '_' + project.fullname + '.xlsx'
response = HttpResponse(
output,
content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
Expand Down

0 comments on commit 5ddd4fe

Please sign in to comment.