0.0.2 init, blocks prepare
This commit is contained in:
0
ServicesApp/__init__.py
Normal file
0
ServicesApp/__init__.py
Normal file
3
ServicesApp/admin.py
Normal file
3
ServicesApp/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
ServicesApp/apps.py
Normal file
6
ServicesApp/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ServicesappConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'ServicesApp'
|
||||
0
ServicesApp/migrations/__init__.py
Normal file
0
ServicesApp/migrations/__init__.py
Normal file
24
ServicesApp/models.py
Normal file
24
ServicesApp/models.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from django.db import models
|
||||
from BaseModels.base_models import *
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
class Section(BaseModelViewPage):
|
||||
class Meta:
|
||||
verbose_name = _('Раздел сайта')
|
||||
verbose_name_plural = _('Разделы сайта')
|
||||
|
||||
|
||||
class Service(BaseModelViewPage):
|
||||
section = models.ForeignKey(
|
||||
Section, verbose_name=_('Раздел'),
|
||||
on_delete=models.SET_NULL, related_name='rel_services_for_section',
|
||||
null=True, blank=True
|
||||
)
|
||||
parent_service = models.ForeignKey(
|
||||
'Service', verbose_name=_('Родитель'),
|
||||
on_delete=models.SET_NULL, related_name='rel_children_for_service',
|
||||
null=True, blank=True
|
||||
)
|
||||
class Meta:
|
||||
verbose_name = _('Услуга')
|
||||
verbose_name_plural = _('Услуги')
|
||||
3
ServicesApp/tests.py
Normal file
3
ServicesApp/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
3
ServicesApp/views.py
Normal file
3
ServicesApp/views.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user