Merge branch 'razrab'
This commit is contained in:
commit
310fa52589
8 files changed
+25
-20
No files matched your search
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- -->
|
<!-- cycle -->
|
||||||
<v-carousel
|
<v-carousel
|
||||||
|
|
||||||
interval="10000"
|
interval="10000"
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
hide-delimiter-background
|
hide-delimiter-background
|
||||||
show-arrows="hover"
|
show-arrows="hover"
|
||||||
color="white"
|
color="white"
|
||||||
cycle
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -22,8 +22,9 @@
|
|||||||
cover
|
cover
|
||||||
eager
|
eager
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
<v-container
|
<v-container
|
||||||
fill-height
|
fill-height
|
||||||
fluid
|
fluid
|
||||||
@@ -33,9 +34,8 @@
|
|||||||
<v-card class="bgCard h-100 d-flex flex-column">
|
<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 text-text_carous py-5 flex-column">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
|
<v-col class="pa-0 pl-1 align-self-center">{{x.title}} </v-col>
|
||||||
</v-col>
|
<!-- {{ burl }} {{ x.sender }} -->
|
||||||
|
|
||||||
<v-col class="flex-grow-0 pa-0 pr-1">
|
<v-col class="flex-grow-0 pa-0 pr-1">
|
||||||
<v-img
|
<v-img
|
||||||
|
|
||||||
|
|||||||
@@ -429,11 +429,11 @@ export default {
|
|||||||
ico: 'mdi-city',
|
ico: 'mdi-city',
|
||||||
path: "/inspection"
|
path: "/inspection"
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: 'К празднику',
|
// name: 'К празднику',
|
||||||
ico: 'mdi-cake-variant',
|
// ico: 'mdi-cake-variant',
|
||||||
path: "/fnshol"
|
// path: "/fnshol"
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
|
|
||||||
const imageSrc = computed(() => {
|
const imageSrc = computed(() => {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
class="flex-column h-100 d-flex"
|
class="flex-column h-100 d-flex"
|
||||||
>
|
>
|
||||||
<v-card class="bgCard h-100 d-flex flex-column">
|
<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-row>
|
||||||
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
|
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
<v-col cols=6 class=" bgText">
|
<v-col cols=6 class=" bgText">
|
||||||
<v-textarea
|
<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
|
:model-value=x.text
|
||||||
variant='plain'
|
variant='plain'
|
||||||
readonly
|
readonly
|
||||||
@@ -148,12 +148,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.titles {
|
.titles {
|
||||||
font-family: cursive !important;
|
/* font-family: cursive !important; */
|
||||||
background: #ffffff8c;
|
background: #ffffff8c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textareas .v-field__input {
|
.textareas .v-field__input {
|
||||||
|
|
||||||
font-size: 3.3em!important;
|
font-size: 2.5em!important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -5,6 +5,8 @@ from .models import *
|
|||||||
class MultiDBModelAdmin(admin.ModelAdmin):
|
class MultiDBModelAdmin(admin.ModelAdmin):
|
||||||
# A handy constant for the name of the alternate database.
|
# A handy constant for the name of the alternate database.
|
||||||
using = "add_base"
|
using = "add_base"
|
||||||
|
list_display=('title', 'order')
|
||||||
|
list_editable=('order', )
|
||||||
|
|
||||||
def save_model(self, request, obj, form, change):
|
def save_model(self, request, obj, form, change):
|
||||||
# Tell Django to save objects to the 'other' database.
|
# Tell Django to save objects to the 'other' database.
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ class Carousels(models.Model):
|
|||||||
text = models.TextField(blank=True, null=True)
|
text = models.TextField(blank=True, null=True)
|
||||||
link = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка')
|
link = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка')
|
||||||
order = models.IntegerField(blank=True, null=True)
|
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:
|
class Meta:
|
||||||
managed = False
|
managed = False
|
||||||
db_table = 'carousels'
|
db_table = 'carousels'
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.title)
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -99,7 +99,7 @@ class CarouselsAPIView(ListAPIView):
|
|||||||
a['sender'] = None
|
a['sender'] = None
|
||||||
result.append(a)
|
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 :
|
if len(manbrd) > 0 :
|
||||||
nowday= manbrd.filter(birthdate__day=date.today().day)
|
nowday= manbrd.filter(birthdate__day=date.today().day)
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ class CarouselsAPIView(ListAPIView):
|
|||||||
|
|
||||||
allbirthday = {
|
allbirthday = {
|
||||||
"title":'Дни рождения',
|
"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),
|
"link": "/media/"+str(brdimage[0].img),
|
||||||
"published": 'true',
|
"published": 'true',
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ class CarouselsAPIView(ListAPIView):
|
|||||||
for k in nowday:
|
for k in nowday:
|
||||||
|
|
||||||
birthday.append({
|
birthday.append({
|
||||||
"title":'Сегодня поздравляем!',
|
"title":'Поздравляем:',
|
||||||
"text": f"{k.fio}!"+"\n"+ f"{brdtext[0].text}",
|
"text": f"{k.fio}!"+"\n"+ f"{brdtext[0].text}",
|
||||||
"link": "/media/"+str(brdimage[0].img),
|
"link": "/media/"+str(brdimage[0].img),
|
||||||
"published": 'true',
|
"published": 'true',
|
||||||
|
|||||||
Reference in new issue
Block a user