Modif. formation
This commit is contained in:
parent
5a23a7a47d
commit
a85f5f7521
4 changed files with 20 additions and 26 deletions
|
|
@ -8,9 +8,10 @@ Created on 17 nov. 2012
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.http.response import HttpResponse
|
from django.http.response import HttpResponse
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from tinymce import models as tinymce_models
|
from tinymce import models as tinymce_models
|
||||||
from reportlab.platypus import SimpleDocTemplate
|
|
||||||
from reportlab.platypus import Table, TableStyle, Image
|
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Image
|
||||||
from reportlab.lib.pagesizes import A4, landscape
|
from reportlab.lib.pagesizes import A4, landscape
|
||||||
from reportlab.lib.units import cm
|
from reportlab.lib.units import cm
|
||||||
from reportlab.lib.enums import TA_LEFT, TA_CENTER
|
from reportlab.lib.enums import TA_LEFT, TA_CENTER
|
||||||
|
|
@ -18,18 +19,18 @@ from reportlab.lib import colors
|
||||||
from reportlab.lib.styles import ParagraphStyle as PS
|
from reportlab.lib.styles import ParagraphStyle as PS
|
||||||
|
|
||||||
|
|
||||||
style_8_c = PS(name='CORPS', fontName='Helvetica', fontSize=6, alignment=TA_CENTER)
|
#style_8_c = PS(name='CORPS', fontName='Helvetica', fontSize=6, alignment=TA_CENTER)
|
||||||
style_normal = PS(name='CORPS', fontName='Helvetica', fontSize=8, alignment=TA_LEFT)
|
#style_normal = PS(name='CORPS', fontName='Helvetica', fontSize=8, alignment=TA_LEFT)
|
||||||
style_bold = PS(name='CORPS', fontName='Helvetica-Bold', fontSize=10, alignment=TA_LEFT)
|
#style_bold = PS(name='CORPS', fontName='Helvetica-Bold', fontSize=10, alignment=TA_LEFT)
|
||||||
style_title = PS(name='CORPS', fontName='Helvetica', fontSize=12, alignment=TA_LEFT)
|
#style_title = PS(name='CORPS', fontName='Helvetica', fontSize=12, alignment=TA_LEFT)
|
||||||
style_adress = PS(name='CORPS', fontName='Helvetica', fontSize=10, alignment=TA_LEFT, leftIndent=300)
|
#style_adress = PS(name='CORPS', fontName='Helvetica', fontSize=10, alignment=TA_LEFT, leftIndent=300)
|
||||||
|
|
||||||
|
|
||||||
CHOIX_TYPE_SAVOIR = (
|
CHOIX_TYPE_SAVOIR = (
|
||||||
('Savoir', 'savoir'),
|
('Savoir', 'savoir'),
|
||||||
('Savoir méthodologique', 'savoir méthodologique'),
|
('Savoir méthodologique', 'savoir méthodologique'),
|
||||||
('Savoir relationnel', 'savoir relationnel'),
|
('Savoir relationnel', 'savoir relationnel'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
CHOIX_TYPE_MODULE = (
|
CHOIX_TYPE_MODULE = (
|
||||||
|
|
@ -60,7 +61,7 @@ class Enseignant(models.Model):
|
||||||
class Domaine(models.Model):
|
class Domaine(models.Model):
|
||||||
code = models.CharField(max_length=20, blank=True)
|
code = models.CharField(max_length=20, blank=True)
|
||||||
nom = models.CharField(max_length=200, blank=False)
|
nom = models.CharField(max_length=200, blank=False)
|
||||||
responsable = models.ForeignKey(Enseignant, null=True, default=None)
|
responsable = models.ForeignKey(Enseignant, null=True, blank=True, default=None, on_delete=models.SET_NULL)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('code', )
|
ordering = ('code', )
|
||||||
|
|
@ -75,7 +76,7 @@ class Domaine(models.Model):
|
||||||
class Processus(models.Model):
|
class Processus(models.Model):
|
||||||
code = models.CharField(max_length=20, blank=True)
|
code = models.CharField(max_length=20, blank=True)
|
||||||
nom = models.CharField(max_length=200, blank=False)
|
nom = models.CharField(max_length=200, blank=False)
|
||||||
domaine = models.ForeignKey(Domaine, null=False)
|
domaine = models.ForeignKey(Domaine, null=False, on_delete=models.PROTECT)
|
||||||
description = models.TextField(default='')
|
description = models.TextField(default='')
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
@ -100,7 +101,6 @@ class Module(models.Model):
|
||||||
travail_perso = models.IntegerField(verbose_name='Travail personnel')
|
travail_perso = models.IntegerField(verbose_name='Travail personnel')
|
||||||
pratique_prof = models.IntegerField(default=0, verbose_name='Pratique prof.')
|
pratique_prof = models.IntegerField(default=0, verbose_name='Pratique prof.')
|
||||||
didactique = models.TextField()
|
didactique = models.TextField()
|
||||||
|
|
||||||
sem1 = models.IntegerField(default=0)
|
sem1 = models.IntegerField(default=0)
|
||||||
sem2 = models.IntegerField(default=0)
|
sem2 = models.IntegerField(default=0)
|
||||||
sem3 = models.IntegerField(default=0)
|
sem3 = models.IntegerField(default=0)
|
||||||
|
|
@ -108,7 +108,7 @@ class Module(models.Model):
|
||||||
sem5 = models.IntegerField(default=0)
|
sem5 = models.IntegerField(default=0)
|
||||||
sem6 = models.IntegerField(default=0)
|
sem6 = models.IntegerField(default=0)
|
||||||
semestre = models.CharField(max_length=15, default='', blank=False)
|
semestre = models.CharField(max_length=15, default='', blank=False)
|
||||||
processus = models.ForeignKey(Processus, null=False, default=None)
|
processus = models.ForeignKey(Processus, null=False, on_delete=models.PROTECT)
|
||||||
|
|
||||||
didactique_published = models.BooleanField(default=False)
|
didactique_published = models.BooleanField(default=False)
|
||||||
evaluation_published = models.BooleanField(default=False)
|
evaluation_published = models.BooleanField(default=False)
|
||||||
|
|
@ -131,7 +131,7 @@ class Competence(models.Model):
|
||||||
code = models.CharField(max_length=20, blank=True)
|
code = models.CharField(max_length=20, blank=True)
|
||||||
nom = models.CharField(max_length=250, blank=False)
|
nom = models.CharField(max_length=250, blank=False)
|
||||||
type = models.CharField(max_length=35, blank=True, default='')
|
type = models.CharField(max_length=35, blank=True, default='')
|
||||||
module = models.ForeignKey(Module, null=True, default=None)
|
module = models.ForeignKey(Module, null=True, blank=True, default=None, on_delete=models.SET_NULL)
|
||||||
proces_eval = models.ForeignKey(Processus, null=True, default=True)
|
proces_eval = models.ForeignKey(Processus, null=True, default=True)
|
||||||
list_display = ('code', 'nom', 'type', 'proces_eval')
|
list_display = ('code', 'nom', 'type', 'proces_eval')
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ class Competence(models.Model):
|
||||||
class SousCompetence(models.Model):
|
class SousCompetence(models.Model):
|
||||||
code = models.CharField(max_length=20, blank=True)
|
code = models.CharField(max_length=20, blank=True)
|
||||||
nom = models.CharField(max_length=250, blank=False)
|
nom = models.CharField(max_length=250, blank=False)
|
||||||
competence = models.ForeignKey(Competence, null=False)
|
competence = models.ForeignKey(Competence, null=False, on_delete=models.PROTECT)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('code',)
|
ordering = ('code',)
|
||||||
|
|
@ -159,7 +159,7 @@ class SousCompetence(models.Model):
|
||||||
class Ressource(models.Model):
|
class Ressource(models.Model):
|
||||||
nom = models.CharField(max_length=200, blank=False)
|
nom = models.CharField(max_length=200, blank=False)
|
||||||
type = models.CharField(max_length=30, choices=CHOIX_TYPE_SAVOIR, default='Savoir')
|
type = models.CharField(max_length=30, choices=CHOIX_TYPE_SAVOIR, default='Savoir')
|
||||||
module = models.ForeignKey(Module, null=True, default=None)
|
module = models.ForeignKey(Module, null=True, default=None, blank=True, on_delete=models.PROTECT)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '{0}'.format(self.nom)
|
return '{0}'.format(self.nom)
|
||||||
|
|
@ -167,7 +167,7 @@ class Ressource(models.Model):
|
||||||
|
|
||||||
class Objectif(models.Model):
|
class Objectif(models.Model):
|
||||||
nom = models.CharField(max_length=200, blank=False)
|
nom = models.CharField(max_length=200, blank=False)
|
||||||
module = models.ForeignKey(Module, null=True, default=None)
|
module = models.ForeignKey(Module, null=True, default=None, blank=True, on_delete=models.PROTECT)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '{0}'.format(self.nom)
|
return '{0}'.format(self.nom)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ FILIERE = 'Formation EDS'
|
||||||
|
|
||||||
class NumberedCanvas(canvas.Canvas):
|
class NumberedCanvas(canvas.Canvas):
|
||||||
"""
|
"""
|
||||||
Page number and page count
|
Page number and pages counter
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,3 @@ urlpatterns = [
|
||||||
url(r'^tinymce/', include('tinymce.urls'), name='tinymce-js'),
|
url(r'^tinymce/', include('tinymce.urls'), name='tinymce-js'),
|
||||||
|
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
||||||
if settings.DEBUG:
|
|
||||||
import debug_toolbar
|
|
||||||
urlpatterns = [
|
|
||||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
|
||||||
] + urlpatterns
|
|
||||||
|
|
@ -109,8 +109,8 @@
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td class="l4 m">{{M13.url_code|safe}}</td>
|
<td class="l4 m">{{M13.url_code|safe}}</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
|
||||||
<td class="l4 m">{{M14.url_code|safe}}</td>
|
<td class="l4 m">{{M14.url_code|safe}}</td>
|
||||||
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!-- Ligne 5 -->
|
<!-- Ligne 5 -->
|
||||||
|
|
@ -125,8 +125,8 @@
|
||||||
<td class="l6 d">{{D6.url|safe}}</td>
|
<td class="l6 d">{{D6.url|safe}}</td>
|
||||||
<td class="l6 p">{{P09.url|safe}}</td>
|
<td class="l6 p">{{P09.url|safe}}</td>
|
||||||
<td colspan="2" class="l6 m">{{M16_1a.url_code|safe}} / {{M16_1b.url_code|safe}} / {{M16_1c.url_code|safe}} / {{M16_1d.url_code|safe}} / {{M16_1e.url_code|safe}}</td>
|
<td colspan="2" class="l6 m">{{M16_1a.url_code|safe}} / {{M16_1b.url_code|safe}} / {{M16_1c.url_code|safe}} / {{M16_1d.url_code|safe}} / {{M16_1e.url_code|safe}}</td>
|
||||||
<td colspan="2" class="l6 m">{{M16_2a.url_code|safe}} / {{M16_2b.url_code|safe}} / {{M16_2c.url_code|safe}}</td>
|
<td colspan="2" class="l6 m">{{M16_2a.url_code|safe}} / {{M16_2b.url_code|safe}} </td>
|
||||||
<td colspan="2" class="l6 m">{{M16_3a.url_code|safe}} / {{M16_3b.url_code|safe}}</td>
|
<td colspan="2" class="l6 m">{{M16_3a.url_code|safe}} / {{M16_3b.url_code|safe}} / {{M16_3c.url_code|safe}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- Ligne 7 -->
|
<!-- Ligne 7 -->
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue