Merge branch 'Alex' into razrab
This commit is contained in:
commit
7d96f91656
6 files changed
+25
-7
No files matched your search
@@ -101,7 +101,7 @@
|
||||
</v-row>
|
||||
<v-divider/>
|
||||
<v-row class="flex-grow-0 ma-0">
|
||||
<v-col>
|
||||
<v-col class="d-flex justify-space-between">
|
||||
<v-btn
|
||||
color="more_details_btn"
|
||||
variant="text"
|
||||
@@ -111,7 +111,7 @@
|
||||
>
|
||||
Подробнее
|
||||
</v-btn>
|
||||
{{news.cdate}}
|
||||
<span class="text-body-2 align-self-center">{{formatDate(news.cdate)}}</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
@@ -123,7 +123,7 @@ import { baseURL } from '@/utils/axios-api'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import {splitname} from '@/utils/universal_functions'
|
||||
|
||||
import moment from 'moment'
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
|
||||
@@ -165,13 +165,18 @@ export default {
|
||||
emit('openOneImg')
|
||||
}
|
||||
|
||||
function formatDate(date) {
|
||||
return moment(date).format('DD-MM-YYYY')
|
||||
}
|
||||
|
||||
return {
|
||||
accountStore,
|
||||
burl,
|
||||
limitText,
|
||||
splitname,
|
||||
toggleIncrementLike,
|
||||
openOneImg
|
||||
openOneImg,
|
||||
formatDate
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 195 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 195 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
+15
-2
@@ -87,11 +87,24 @@ class LinksAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'link')
|
||||
list_display_links = ('link',)
|
||||
|
||||
class BirthdayImageAdmin(admin.ModelAdmin):
|
||||
list_display = ('get_html_photo',)
|
||||
readonly_fields=('get_html_photo',)
|
||||
|
||||
def get_html_photo(self, object):
|
||||
if object.img:
|
||||
return mark_safe(f"<img src='{object.img.url}' width=50>")
|
||||
|
||||
get_html_photo.short_description="Превью изображения"
|
||||
|
||||
class BirthdayTextAdmin(admin.ModelAdmin):
|
||||
list_display = ('text',)
|
||||
|
||||
admin.site.register(Links, LinksAdmin)
|
||||
admin.site.register(News, NewsAdmin)
|
||||
admin.site.register(Carousels, CarouselsAdmin)
|
||||
admin.site.register(BaseSender, BaseSenderAdmin)
|
||||
admin.site.register(ScoreNews, ScoreNewsAdmin)
|
||||
admin.site.register(CommentNews, CommentNewsAdmin)
|
||||
admin.site.register(BirthdayImage)
|
||||
admin.site.register(BirthdayText)
|
||||
admin.site.register(BirthdayImage, BirthdayImageAdmin)
|
||||
admin.site.register(BirthdayText, BirthdayTextAdmin)
|
||||
@@ -140,7 +140,7 @@ class BirthdayImage(models.Model):
|
||||
return str(self.pk)
|
||||
|
||||
class BirthdayText(models.Model):
|
||||
text= models.TextField(max_length=260, null=True, verbose_name='Сообщение')
|
||||
text= models.TextField(max_length=260, null=True, verbose_name='Текст поздравления')
|
||||
|
||||
class Meta:
|
||||
|
||||
|
||||
Reference in new issue
Block a user