Заливка
This commit is contained in:
1 parent
05f5cb60d6
commit
8bde57c40e
9 files changed
+27
-19
No files matched your search
@@ -85,7 +85,7 @@ class CarouselsAPIView(ListAPIView):
|
||||
def get(self, request):
|
||||
|
||||
|
||||
queryset = Carousels.objects.filter(published=True, cdate__lte=datetime.now(), enddate__gte=datetime.now()).order_by('-cdate')
|
||||
queryset = Carousels.objects.filter(published=True, cdate__lte=datetime.now(), enddate__gte=datetime.now()).order_by('order','sender__order')
|
||||
|
||||
result = []
|
||||
for x in queryset:
|
||||
@@ -119,10 +119,10 @@ class CarouselsAPIView(ListAPIView):
|
||||
|
||||
brdtext = BirthdayText.objects.order_by("?")[:len(nowday)]
|
||||
|
||||
|
||||
result.append(birthday)
|
||||
for k in nowday:
|
||||
|
||||
birthday.append({
|
||||
result.append({
|
||||
"title":'Поздравляем:',
|
||||
"text": f"{k.fio}!"+"\n"+ f"{brdtext[0].text}",
|
||||
"link": "/media/"+str(brdimage[0].img),
|
||||
@@ -132,8 +132,10 @@ class CarouselsAPIView(ListAPIView):
|
||||
|
||||
|
||||
|
||||
|
||||
result = [allbirthday] + birthday+ result
|
||||
# print(result, 'result ------------------------------------')
|
||||
# print(allbirthday, 'allbirthday ------------------------------------')
|
||||
# print(birthday, 'birthday ------------------------------------')
|
||||
# result = [allbirthday] + birthday+ result
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user