Commit 19903e75 authored by cynddl's avatar cynddl

Fix missing options for Article model

parent 5df206e6
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-22 19:17
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rp', '0004_auto_20170422_1906'),
]
operations = [
migrations.RemoveField(
model_name='article',
name='published',
),
migrations.AddField(
model_name='article',
name='status',
field=models.CharField(choices=[('PENDING', 'Pending'), ('PUBLISHED', 'Published'), ('REJECTED', 'Rejected')], default='PENDING', max_length=20, verbose_name='Published'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-22 19:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rp', '0005_auto_20170422_1917'),
]
operations = [
migrations.AlterField(
model_name='article',
name='extracts',
field=models.TextField(blank=True, null=True, verbose_name='Content extracts'),
),
migrations.AlterField(
model_name='article',
name='lang',
field=models.CharField(max_length=50, null=True, verbose_name='Language'),
),
migrations.AlterField(
model_name='article',
name='metadata',
field=models.TextField(blank=True, null=True, verbose_name='Opengraph metadata'),
),
migrations.AlterField(
model_name='article',
name='published_at',
field=models.DateTimeField(blank=True, null=True, verbose_name='Publication date'),
),
migrations.AlterField(
model_name='article',
name='screenshot',
field=models.ImageField(blank=True, null=True, upload_to='', verbose_name='Article screenshot'),
),
migrations.AlterField(
model_name='article',
name='title',
field=models.CharField(default='', max_length=255, verbose_name='Article title'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-22 20:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rp', '0006_auto_20170422_1920'),
]
operations = [
migrations.AddField(
model_name='article',
name='website',
field=models.CharField(default='', max_length=255, verbose_name='Website'),
),
]
......@@ -7,16 +7,25 @@ from newspaper import Article as ArticleParser
class Article(UnDVotedMixin):
url = models.URLField("URL")
lang = models.CharField(_("Language"), max_length=50)
metadata = models.TextField(_("Opengraph metadata"))
screenshot = models.ImageField(_("Article screenshot"))
title = models.CharField(_("Article title"), max_length=255)
extracts = models.TextField(_("Content extracts"))
lang = models.CharField(_("Language"), max_length=50, null=True)
metadata = models.TextField(_("Opengraph metadata"), blank=True, null=True)
screenshot = models.ImageField(_("Article screenshot"), blank=True, null=True)
title = models.CharField(_("Article title"), max_length=255, default="")
website = models.CharField(_("Website"), max_length=255, default="")
extracts = models.TextField(_("Content extracts"), blank=True, null=True)
published_at = models.DateTimeField(_("Publication date"))
created_at = models.DateTimeField(_("Creation date"), auto_now_add=True)
updated_at = models.DateTimeField(_("Last update"), auto_now=True)
published = models.BooleanField(_("Published"))
published_at = models.DateTimeField(_("Publication date"), blank=True, null=True)
STATUS_CHOICES = (
("PENDING", _("Pending")),
("PUBLISHED", _("Published")),
("REJECTED", _("Rejected"))
)
status = models.CharField(
_("Published"), choices=STATUS_CHOICES, default="PENDING",
max_length=20)
tags = TaggableManager()
......
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