Исправление замечаний, описание компонентов

This commit is contained in:
iriska-gri committed 2024-03-22 11:53:07 +03:00
1 parent f38ed176e9
commit 8c5b01f6d4
18 files changed
+207 -195

No files matched your search

+1 -8
View File
@@ -68,7 +68,6 @@ class CustomAuth(ModelBackend):
# try:
user = DictEmployee.objects.get(login=username)
# print(user)
if user.deleted!=1:
homeuser, created = User.objects.get_or_create(username=username)
@@ -92,10 +91,4 @@ class CustomAuth(ModelBackend):
return homeuser
# except Exception as e:
# print (e)
# elif status_code==403:
# print('loh')
# return None
+3 -7
View File
@@ -162,7 +162,7 @@ class roundExcel():
def excelvacation(self):
print('helooooooooooooooooooooooooooooooooooooo')
pass
class loadExcel():
@@ -232,10 +232,6 @@ class loadExcel():
df3['d'] = df3['d'].astype(int)
for ind in df3.index:
# print(df3['login'][ind])
#
GeneralVacation.objects.create(login=df3['login'][ind], planned_date=df3['c'][ind], count_days=df3['d'][ind], type_of_vacation=df3['e'][ind], start_work_period=df3['f'][ind])
# DailyRoundUp.objects.update_or_create(todaysDate=datetime.strptime(datas, '%d.%m.%Y').strftime('%Y-%m-%d'),
# user=df3['login'][ind], defaults={'position':base})
+1 -1
View File
@@ -47,7 +47,7 @@ class DailyRoundUpAPIView(APIView):
re = roundExcel(user)
print( request.GET.get("excel"), '-------------------------------')
file_path = getattr(re, request.GET.get("excel"))()
# if request.GET.get("excel") == 'round':
# file_path = re.excround()
-5
View File
@@ -22,11 +22,6 @@ class Counter(ListAPIView):
def get(self, request):
"""Не используется"""
# data = UserComment.objects.filter(Q(time_create__range=['2024-01-01', '2024-03-01']), ~Q(comment='')). \
# values().order_by('-time_create')
# print(data,'---------------------------------------------------------')
return Response('Не используется')