Родитель
0734b1951c
Коммит
6b1b9808b9
|
@ -28,6 +28,7 @@ class EntryAdmin(admin.ModelAdmin):
|
|||
fields = (
|
||||
'id',
|
||||
'created',
|
||||
'entry_type',
|
||||
'moderation_state',
|
||||
'title',
|
||||
'description',
|
||||
|
@ -59,6 +60,7 @@ class EntryAdmin(admin.ModelAdmin):
|
|||
|
||||
list_display = (
|
||||
'id',
|
||||
'entry_type',
|
||||
'title',
|
||||
'created',
|
||||
'published_by',
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-04-23 20:15
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('entries', '0023_auto_20180430_1756'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='entry',
|
||||
name='entry_type',
|
||||
field=models.CharField(choices=[('base', 'base'), ('project', 'project'), ('news', 'news'), ('curriculum', 'curriculum'), ('research', 'research'), ('session', 'session')], default='base', max_length=20),
|
||||
),
|
||||
]
|
|
@ -73,8 +73,22 @@ class Entry(models.Model):
|
|||
"""
|
||||
A pulse entry
|
||||
"""
|
||||
ENTRY_TYPES = (
|
||||
('base', 'base'),
|
||||
('project', 'project'),
|
||||
('news', 'news'),
|
||||
('curriculum', 'curriculum'),
|
||||
('research', 'research'),
|
||||
('session', 'session'),
|
||||
)
|
||||
|
||||
# required fields
|
||||
entry_type = models.CharField(
|
||||
max_length=20,
|
||||
choices=ENTRY_TYPES,
|
||||
default=ENTRY_TYPES[0][0],
|
||||
null=False,
|
||||
)
|
||||
title = models.CharField(max_length=140)
|
||||
content_url = models.URLField()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче