This commit is contained in:
Mikan
2025-05-18 19:19:16 +03:00
commit 63228923a7
29 changed files with 432 additions and 0 deletions

0
core/__init__.py Normal file
View File

3
core/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
core/apps.py Normal file
View File

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

View File

15
core/mixins.py Normal file
View File

@@ -0,0 +1,15 @@
from django.db import models
class ContactMixin(models.Model):
first_name = models.CharField(max_length=100, verbose_name="Имя")
last_name = models.CharField(max_length=100, verbose_name="Фамилия")
middle_name = models.CharField(max_length=100, blank=True, null=True, verbose_name="Отчество")
phone = models.CharField(max_length=20, blank=True, null=True, verbose_name="Телефон")
email = models.EmailField(blank=True, null=True, verbose_name="Почта")
def __str__(self):
return f"{self.last_name} {self.first_name}"
class Meta:
abstract = True

0
core/models.py Normal file
View File

3
core/tests.py Normal file
View File

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

3
core/views.py Normal file
View File

@@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.