Commit 7122c6b6 authored by Leila's avatar Leila

create models

parent e87a9817
Pipeline #1814 canceled with stages
# Generated by Django 2.1.1 on 2018-10-05 04:13
import cuisine_entre_amis.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cuisine_entre_amis', '0006_post_tags'),
]
operations = [
migrations.AlterField(
model_name='post',
name='intro_pic',
field=models.ImageField(blank=True, null=True, upload_to=cuisine_entre_amis.models.get_path),
),
]
......@@ -41,8 +41,7 @@ class Post(models.Model):
created = models.DateTimeField(_('Created'), auto_now_add=True)
publish_on = models.DateTimeField('Publish on', blank=True, null=True)
intro = models.TextField(blank=True, null=True)
intro_pic = models.ImageField(blank=True, null=True)
author = models.ForeignKey('Author')
author = models.ForeignKey('Author', on_delete=models.CASCADE)
tags = TaggableManager()
......@@ -51,7 +50,7 @@ class Post(models.Model):
class PostPart(models.Model):
post = models.ForeignKey(Post, related_name='parts')
post = models.ForeignKey(Post, related_name='parts', on_delete=models.CASCADE)
type = models.CharField(_('Type'), max_length=5, choices=(
('nopic', _('No picture')),
('left', _('Picture on the left')),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment