Merge branch 'razrab'
This commit is contained in:
commit
dfa2a2bb0a
6 files changed
+106
-32
No files matched your search
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="bg-yellow flex-column h-100">
|
||||
|
||||
<v-card
|
||||
:ref="i"
|
||||
class="mx-auto px-3 pt-3"
|
||||
|
||||
@@ -25,7 +25,49 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="flex-column d-flex flex-grow-0 px-0" lg="2">
|
||||
<v-col class="flex-column d-flex ma-3">
|
||||
<v-row class="bg-red">
|
||||
<v-col class="flex-grow-0"> <digital-letna/></v-col>
|
||||
<v-col class="flex-column d-flex h-100">
|
||||
<v-card class="overflow-auto d-flex h-100 flex-column">
|
||||
|
||||
<News-list-home />
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="bg-yellow flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<v-btn-toggle
|
||||
v-model="toggle"
|
||||
divided
|
||||
variant="outlined"
|
||||
>
|
||||
<v-tooltip
|
||||
v-for="x in favorit"
|
||||
:key="x"
|
||||
:text="x.page"
|
||||
location="top"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn
|
||||
v-bind="props"
|
||||
:icon="x.ico"
|
||||
:to="x.fullPath"
|
||||
/>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
<!-- <v-col class="flex-column d-flex flex-grow-0 px-0" >
|
||||
<v-row class="flex-grow-1 ma-0 mx-1">
|
||||
<v-col class="pt-0 flex-column ">
|
||||
<digital-letna/>
|
||||
@@ -33,47 +75,46 @@
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 ma-0 mx-1">
|
||||
<v-col class="py-0">
|
||||
<v-card class="h-100 flex-colmn"
|
||||
>
|
||||
<v-card class="h-100 flex-colmn">
|
||||
<v-row class="ma-3">
|
||||
<v-col
|
||||
|
||||
|
||||
class="pa-1 text-center"
|
||||
class="pa-1 text-center"
|
||||
>
|
||||
<v-btn-toggle
|
||||
v-model="toggle"
|
||||
divided
|
||||
variant="outlined"
|
||||
>
|
||||
<v-tooltip
|
||||
v-for="x in favorit"
|
||||
:key="x"
|
||||
:text="x.page"
|
||||
location="top"
|
||||
>
|
||||
<v-btn-toggle
|
||||
v-model="toggle"
|
||||
divided
|
||||
variant="outlined"
|
||||
>
|
||||
<v-btn
|
||||
v-for="x in favorit"
|
||||
:key="x"
|
||||
:icon="x.ico"
|
||||
:to="x.fullPath"/>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn
|
||||
v-bind="props"
|
||||
:icon="x.ico"
|
||||
:to="x.fullPath"
|
||||
/>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-btn-toggle>
|
||||
<!-- <v-btn
|
||||
:prepend-icon="x.ico"
|
||||
size="x-small"
|
||||
|
||||
variant="outlined"
|
||||
class="ma-1"
|
||||
:to="x.fullPath"
|
||||
stacked
|
||||
>
|
||||
|
||||
</v-btn> -->
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!-- <my-helper :pretext="favorit"/> -->
|
||||
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
<v-col class="d-flex flex-column pl-0 justify-space-between" lg=3>
|
||||
<v-col class="d-flex flex-column pl-0 justify-space-between" >
|
||||
<v-card
|
||||
class="h-100 bg-transparent flex-column d-flex "
|
||||
elevation="1"
|
||||
@@ -94,7 +135,7 @@
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
+30
-1
@@ -1,5 +1,34 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
from django.db.models import Q
|
||||
# Register your models here.
|
||||
class MultiDBModelAdmin(admin.ModelAdmin):
|
||||
# A handy constant for the name of the alternate database.
|
||||
using = "user_directory"
|
||||
|
||||
# admin.site.register(DictEmployee)
|
||||
def save_model(self, request, obj, form, change):
|
||||
# Tell Django to save objects to the 'other' database.
|
||||
obj.save(using=self.using)
|
||||
|
||||
def delete_model(self, request, obj):
|
||||
# Tell Django to delete objects from the 'other' database
|
||||
obj.delete(using=self.using)
|
||||
|
||||
def get_queryset(self, request):
|
||||
# Tell Django to look for objects on the 'other' database.
|
||||
return super().get_queryset(request).using(self.using).filter(~Q(deleted=1))
|
||||
|
||||
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
# Tell Django to populate ForeignKey widgets using a query
|
||||
# on the 'other' database.
|
||||
return super().formfield_for_foreignkey(
|
||||
db_field, request, using=self.using, **kwargs
|
||||
)
|
||||
|
||||
def formfield_for_manytomany(self, db_field, request, **kwargs):
|
||||
# Tell Django to populate ManyToMany widgets using a query
|
||||
# on the 'other' database.
|
||||
return super().formfield_for_manytomany(
|
||||
db_field, request, using=self.using, **kwargs
|
||||
)
|
||||
admin.site.register(DictEmployee, MultiDBModelAdmin)
|
||||
@@ -155,6 +155,9 @@ class DictEmployee(models.Model):
|
||||
managed = False
|
||||
db_table = 'dict_employee'
|
||||
|
||||
def __str__(self):
|
||||
return str(self.fio)
|
||||
|
||||
|
||||
class DictPosition(models.Model):
|
||||
|
||||
|
||||
Reference in new issue
Block a user