Quasiment fini le prototype
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage_django / savoirs / models.py
1 from django.db import models
2
3
4 class Discipline(models.Model):
5 id = models.IntegerField(primary_key=True, db_column='id_discipline')
6 nom = models.CharField(max_length=765, db_column='nom_discipline')
7 class Meta:
8 db_table = u'discipline'
9 ordering = ["nom",]
10
11 class Actualite(models.Model):
12 id = models.IntegerField(primary_key=True, db_column='id_actualite')
13 titre = models.CharField(max_length=765, db_column='titre_actualite')
14 texte = models.TextField(db_column='texte_actualite')
15 url = models.CharField(max_length=765, db_column='url_actualite')
16 logo = models.CharField(max_length=765, db_column='logo_actualite')
17 date = models.DateField(db_column='date_actualite')
18 visible = models.CharField(max_length=3, db_column='visible_actualite')
19 ancienid = models.IntegerField(db_column='ancienId_actualite') # Field name made lowercase.
20 class Meta:
21 db_table = u'actualite'
22 ordering = ["-date",]
23