Merge branch 'razrab'

This commit is contained in:
iriska-gri committed 2023-11-23 14:03:24 +03:00
commit 310fa52589
8 files changed
+25 -20

No files matched your search

Binary file not shown.
+7 -7
View File
@@ -1,5 +1,5 @@
<template>
<!-- -->
<!-- cycle -->
<v-carousel
interval="10000"
@@ -9,7 +9,7 @@
hide-delimiter-background
show-arrows="hover"
color="white"
cycle
@@ -22,8 +22,9 @@
cover
eager
>
<!-- -->
<v-container
fill-height
fluid
@@ -33,9 +34,8 @@
<v-card class="bgCard h-100 d-flex flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column">
<v-row>
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
</v-col>
<v-col class="pa-0 pl-1 align-self-center">{{x.title}} </v-col>
<!-- {{ burl }} {{ x.sender }} -->
<v-col class="flex-grow-0 pa-0 pr-1">
<v-img
@@ -429,11 +429,11 @@ export default {
ico: 'mdi-city',
path: "/inspection"
},
{
name: 'К празднику',
ico: 'mdi-cake-variant',
path: "/fnshol"
}
// {
// name: 'К празднику',
// ico: 'mdi-cake-variant',
// path: "/fnshol"
// }
]
const imageSrc = computed(() => {
+4 -4
View File
@@ -29,7 +29,7 @@
class="flex-column h-100 d-flex"
>
<v-card class="bgCard h-100 d-flex flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles py-5 flex-column">
<v-row>
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
</v-col>
@@ -53,7 +53,7 @@
<v-col cols=6 class=" bgText">
<v-textarea
class="text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium"
class="mt-n3 text-black textareas pt-2 font-weight-medium"
:model-value=x.text
variant='plain'
readonly
@@ -148,12 +148,12 @@
}
.titles {
font-family: cursive !important;
/* font-family: cursive !important; */
background: #ffffff8c;
}
.textareas .v-field__input {
font-size: 3.3em!important;
font-size: 2.5em!important;
}
</style>
+2
View File
@@ -5,6 +5,8 @@ from .models import *
class MultiDBModelAdmin(admin.ModelAdmin):
# A handy constant for the name of the alternate database.
using = "add_base"
list_display=('title', 'order')
list_editable=('order', )
def save_model(self, request, obj, form, change):
# Tell Django to save objects to the 'other' database.
+4 -1
View File
@@ -15,7 +15,10 @@ class Carousels(models.Model):
text = models.TextField(blank=True, null=True)
link = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка')
order = models.IntegerField(blank=True, null=True)
link2 = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка2')
link2 = models.ImageField(upload_to='fns/%Y/%m/%d', null=True, verbose_name='Картинка2')
class Meta:
managed = False
db_table = 'carousels'
def __str__(self):
return str(self.title)
Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

+3 -3
View File
@@ -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',