Commit a92f7b1c authored by Myriam Begel's avatar Myriam Begel

Modèle pour les publications

parent 47e4aa4f
from django.contrib import admin
# Register your models here.
from .models import Publication
admin.site.register(Publication)
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-12 23:13
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Publication',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('titre', models.CharField(max_length=200)),
('auteurs', models.CharField(max_length=200)),
('date', models.DateField()),
('editeur', models.CharField(max_length=200)),
('description', models.TextField()),
],
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-12 23:36
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('perso_app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='publication',
name='editeur',
field=models.CharField(blank=True, max_length=200),
),
]
from django.db import models
# Create your models here.
class Publication(models.Model):
titre = models.CharField(max_length = 200)
auteurs = models.CharField(max_length = 200)
date = models.DateField()
editeur = models.CharField(max_length = 200, blank = True)
description = models.TextField()
def __str__(self):
return self.titre
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