Рефакторинг кода бэкенда и фронтенда

This commit is contained in:
Alex committed 2024-04-18 16:50:57 +03:00
1 parent 949087bd83
commit 631cecc8cd
4 files changed
+27 -17

No files matched your search

+1
View File
@@ -12,6 +12,7 @@ class DictEmployeeAdmin(admin.ModelAdmin):
# class DictEmployeeAdmin(admin.ModelAdmin):
class IlineComitteeFiles(admin.StackedInline):
# readonly_fields = ['file_name']
model = Committee1Files
extra = 0
+5 -1
View File
@@ -29,7 +29,8 @@ class Committee1(models.Model):
class Committee1Files(models.Model):
id_committee1 = models.ForeignKey(Committee1, models.DO_NOTHING, db_column='id_committee1', db_comment='╚─ ъюьшёёшш')
file_name = models.FileField(upload_to='comitee_files')
file_name = models.FileField(null=True, blank=True, upload_to='comitee_files')
# file_name = models.CharField(max_length=1024, db_comment='╚ь Їрщыр')
is_actual = models.IntegerField(db_comment='╧Ёшчэръ ръЄєры№эюёЄш Їрщыр')
class Meta:
@@ -38,6 +39,9 @@ class Committee1Files(models.Model):
def __str__(self):
return str(self.file_name)
def save(self, *args, **kwargs):
super().save(*args, **kwargs)
class Committee2(models.Model):