change field
This commit is contained in:
@@ -26,6 +26,7 @@ INSTALLED_APPS = [
|
||||
'rest_framework_simplejwt',
|
||||
'corsheaders',
|
||||
'payme',
|
||||
"ckeditor",
|
||||
# apps
|
||||
'core.apps.accounts',
|
||||
'core.apps.orders',
|
||||
@@ -158,3 +159,12 @@ PAYME_AMOUNT_FIELD = "total_price"
|
||||
PAYME_ACCOUNT_MODEL = "core.apps.orders.models.Order"
|
||||
PAYME_ONE_TIME_PAYMENT = True
|
||||
PAYME_ACCOUNT_FIELD_TYPE = "int"
|
||||
|
||||
|
||||
CKEDITOR_CONFIGS = {
|
||||
"default": {
|
||||
"toolbar": "full",
|
||||
"height": 300,
|
||||
"width": "100%",
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
# Generated by Django 5.2 on 2025-09-27 17:57
|
||||
|
||||
import ckeditor.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('common', '0009_aboutus_full_text_en_aboutus_full_text_ru_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='aboutus',
|
||||
name='full_text',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='aboutus',
|
||||
name='full_text_en',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='aboutus',
|
||||
name='full_text_ru',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='aboutus',
|
||||
name='full_text_uz',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='news',
|
||||
name='full_text',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='news',
|
||||
name='full_text_en',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='news',
|
||||
name='full_text_ru',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='news',
|
||||
name='full_text_uz',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='service',
|
||||
name='full_text',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='service',
|
||||
name='full_text_en',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='service',
|
||||
name='full_text_ru',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='service',
|
||||
name='full_text_uz',
|
||||
field=ckeditor.fields.RichTextField(null=True),
|
||||
),
|
||||
]
|
||||
@@ -1,6 +1,8 @@
|
||||
import uuid
|
||||
from django.db import models
|
||||
|
||||
from ckeditor.fields import RichTextField
|
||||
|
||||
|
||||
class BaseModel(models.Model):
|
||||
id = models.UUIDField(primary_key=True, editable=False, unique=True, db_index=True, default=uuid.uuid4)
|
||||
@@ -32,7 +34,7 @@ class Banner(BaseModel):
|
||||
class AboutUs(BaseModel):
|
||||
title = models.CharField(max_length=200)
|
||||
description = models.TextField()
|
||||
full_text = models.TextField(null=True)
|
||||
full_text = RichTextField(null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
@@ -68,7 +70,7 @@ class Service(BaseModel):
|
||||
text = models.TextField()
|
||||
icon = models.ImageField(upload_to='service/icons/')
|
||||
image = models.ImageField(upload_to='service/images/')
|
||||
full_text = models.TextField(null=True)
|
||||
full_text = RichTextField(null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
@@ -106,7 +108,7 @@ class News(BaseModel):
|
||||
image = models.ImageField(unique='news/images/')
|
||||
title = models.CharField(max_length=300)
|
||||
text = models.TextField()
|
||||
full_text = models.TextField(null=True)
|
||||
full_text = RichTextField(null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
@@ -38,4 +38,5 @@ uvicorn==0.35.0
|
||||
vine==5.1.0
|
||||
wcwidth==0.2.13
|
||||
requests
|
||||
payme-pkg
|
||||
payme-pkg
|
||||
django-ckeditor
|
||||
|
||||
Reference in New Issue
Block a user