Исправление замечаний, описание компонентов
This commit is contained in:
1 parent
f38ed176e9
commit
8c5b01f6d4
18 files changed
+207
-195
No files matched your search
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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})
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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('Не используется')
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user