Commit efaba1a5 authored by Georges Khaznadar's avatar Georges Khaznadar

new model for exports

parent f07c7283
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-21 21:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pose', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Export',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('directory', models.CharField(max_length=30)),
('modifDate', models.DateTimeField(blank=True, null=True)),
('flavor', models.IntegerField(blank=True, choices=[(1, 'Pronote'), (2, 'Intendance'), (3, 'Trombinoscope')], null=True)),
('comment', models.TextField()),
],
),
]
......@@ -22,4 +22,19 @@ class Person(models.Model):
def __str__(self):
return "{f} {l}".format(f=self.firstName, l=self.lastName)
EXPORTFLAVORS =(
(1,'Pronote'),
(2,'Intendance'),
(3,'Trombinoscope'),
)
class Export(models.Model):
directory = models.CharField(max_length=30)
modifDate = models.DateTimeField(blank=True, null=True)
flavor = models.IntegerField(choices=EXPORTFLAVORS, blank=True, null=True)
comment = models.TextField()
def __str__(self):
return self.directory
......@@ -341,7 +341,6 @@ def pourPronote(request):
"prenom": prenom,
"url": photo.url,
})
print("GRRRR", vignettes)
return render(request,"pose/pourPronote.html",{
"destdir": destdir+"/",
"vignettes" : vignettes,
......
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