fix
This commit is contained in:
18
tutorial/migrations/0003_alter_tutorial_code.py
Normal file
18
tutorial/migrations/0003_alter_tutorial_code.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.2.3 on 2025-06-15 06:52
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('tutorial', '0002_tutorial_code_tutorial_type'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='tutorial',
|
||||||
|
name='code',
|
||||||
|
field=models.TextField(blank=True, null=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -9,7 +9,7 @@ class Tutorial(models.Model):
|
|||||||
|
|
||||||
title = models.CharField(max_length=128)
|
title = models.CharField(max_length=128)
|
||||||
content = models.TextField()
|
content = models.TextField()
|
||||||
code = models.TextField(default="")
|
code = models.TextField(null=True, blank=True)
|
||||||
type = models.CharField(max_length=10, choices=TYPE_CHOICES, default='python')
|
type = models.CharField(max_length=10, choices=TYPE_CHOICES, default='python')
|
||||||
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
|
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||||
created_at = models.DateTimeField(auto_now_add=True)
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user