Compare commits

..

No commits in common. "2a41108ced9f2c4c4128a83a7dc6c0b08e764e18" and "c143650bdd4c809e90e96d432ebe796639b66128" have entirely different histories.

7 changed files with 0 additions and 43 deletions

View File

View File

@ -1,4 +0,0 @@
from django.contrib import admin
from .models import CustomField, CustomTable
admin.site.register(CustomField, CustomTable)

View File

@ -1,6 +0,0 @@
from django.apps import AppConfig
class TmcConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'tmc'

View File

@ -1,28 +0,0 @@
from django.db import models
class CustomField(models.Model):
FIELD_TYPES = (
('char', 'CharField'),
('int', 'IntegerField'),
('text', 'TextField'),
('bool', 'BooleanField'),
('date', 'DateField'),
)
name = models.CharField(max_length=100)
field_type = models.CharField(max_length=10, choices=FIELD_TYPES)
required = models.BooleanField(default=False)
def __str__(self):
return self.name
class CustomTable(models.Model):
custom_table = models.ForeignKey(CustomField, on_delete = models.CASCADE)
name = models.CharField("Наименование", max_length=100)
task_info = models.TextField("Информация, которая хранится в задачах на поставку ТМЦ (взяты из трекера)")
scan = models.TextField("Скан сертификата")
comment = models.TextField("Комментарий",blank=True, null=True)
def __str__(self):
return self.name

View File

@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

View File

@ -1,2 +0,0 @@
from django.shortcuts import render