v3
This commit is contained in:
1 parent
fc742ef2f2
commit
b90574a809
8 files changed
+25
-20
No files matched your search
@@ -99,7 +99,7 @@ class CarouselsAPIView(ListAPIView):
|
||||
a['sender'] = None
|
||||
result.append(a)
|
||||
|
||||
manbrd = DictEmployee.objects.filter(birthdate__month=date.today().month)
|
||||
manbrd = DictEmployee.objects.filter(birthdate__month=date.today().month).order_by('birthdate__day')
|
||||
if len(manbrd) > 0 :
|
||||
nowday= manbrd.filter(birthdate__day=date.today().day)
|
||||
|
||||
@@ -107,7 +107,7 @@ class CarouselsAPIView(ListAPIView):
|
||||
|
||||
allbirthday = {
|
||||
"title":'Дни рождения',
|
||||
"text": "\n".join([f"{x.birthdate.strftime('%d')} - {x.fio}" for x in manbrd]),
|
||||
"text": "В этом месяце:\n"+"\n".join([f"{x.birthdate.strftime('%d')} - {x.fio}" for x in manbrd]),
|
||||
"link": "/media/"+str(brdimage[0].img),
|
||||
"published": 'true',
|
||||
|
||||
@@ -123,7 +123,7 @@ class CarouselsAPIView(ListAPIView):
|
||||
for k in nowday:
|
||||
|
||||
birthday.append({
|
||||
"title":'Сегодня поздравляем!',
|
||||
"title":'Поздравляем:',
|
||||
"text": f"{k.fio}!"+"\n"+ f"{brdtext[0].text}",
|
||||
"link": "/media/"+str(brdimage[0].img),
|
||||
"published": 'true',
|
||||
|
||||
Reference in new issue
Block a user