Skip to content

Commit

Permalink
HOTFIX3 filter date
Browse files Browse the repository at this point in the history
  • Loading branch information
sh1nkey committed Feb 12, 2024
1 parent a8ec678 commit 3f51492
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion partner_programs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,16 @@ def get_export_file_view(self, request, object_id):

def get_export_file(self, partner_program: PartnerProgram):
json_schema = partner_program.data_schema
from datetime import datetime

# Определим даты 1 ноября и 12 февраля
start_date = datetime(2023, 11, 1)
end_date = datetime(2024, 2, 12)

# Произведем фильтрацию
profiles = PartnerProgramUserProfile.objects.filter(
partner_program=partner_program
partner_program=partner_program,
datetime_created__range=(start_date, end_date)
)
to_delete_from_json_scheme = []
column_names = ["Имя", "Фамилия", "Отчество", "Почта", "Дата рождения"]
Expand Down

0 comments on commit 3f51492

Please sign in to comment.