Compare commits

...

2 Commits

6 changed files with 60 additions and 3 deletions

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/mns.iml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -1,6 +1,12 @@
from django.contrib import admin
from seo.models import KupiZabor, Seo
from .models import Seo
# Register your models here.
admin.site.register(Seo)
admin.site.register(KupiZabor)
admin.site.register(KupiZabor)

View File

@ -14,6 +14,35 @@ class KupiZabor(models.Model):
title = models.CharField(max_length=200)
content = models.TextField()
url = models.CharField(max_length=200) # URL страницы
meta_title = models.CharField(max_length=200, blank=True, null=True) # Мета-тег Title
meta_description = models.TextField(blank=True, null=True) # Мета-тег Description
keywords = models.CharField(max_length=200, blank=True, null=True) # Ключевые слова
is_indexed = models.BooleanField(default=True) # Показывать ли страницу в поисковых системах
def str(self):
return self.title
class pages(models.Model):
us = models.TextField("О нас")
delivery = models.TextField("Доставка")
other = models.TextField("Наши клиенты")
contacts = models.TextField("Контакты")
class rewus(models.Model):
image = models.ImageField("/image")
text = models.TextField("Да был бы у меня такой забор - я, может, и не женился бы!")
comment = models.TextField("Папа Дяди Фёдора, любитель забора")
image_2 = models.ImageField("/image")
text_2 = models.TextField("Такой же забор я видел у самого господина ПЖ!")
comment_2 = models.TextField("Евгений Леонов, чатланин")
image_3 = models.ImageField("/image")
text_3 = models.CharField("Малыш, но вдь я же лучше забора?..")
comment_3 = models.CharField("Человек, ничего не понимающий в заборах")
class calculator(models.Model):
calculator = models.TextField("Калькулятор")
section = models.CharField('Длина секции,см:', max_length=50)
height = models.CharField("Высота,см:", max_length=50)
quantity = models.CharField("Количество секций,шт.:", max_length=50)
specifications =models.CharField("Ёще какие-то характеристики:", max_length=50)
meta_title = models.CharField(
max_length=200, blank=True, null=True
) # Мета-тег Title
@ -25,3 +54,4 @@ class KupiZabor(models.Model):
def __str__(self):
return self.title

View File

@ -9,8 +9,10 @@ class SeoSerializer(serializers.ModelSerializer):
class Meta:
model = Seo
fields = ["id", "text", "email", "blank", "image"]
class KPSerializer(serializers.ModelSerializer):
class Meta:
model = KupiZabor
fields = '__all__'
fields = '__all__'