new file: news/__init__.py
[univ_ap.git] / news / newsserializer.py
1 from news.models import News,CategorieDossier
2 from rest_framework import serializers
3
4 class NewsSerializer(serializers.ModelSerializer):
5 class Meta:
6 model = News
7 # field = ('categorie')
8 field = ('titre','lien_vers_site','images','extrait_contenu','categorie','date_creation','categorie_dossier','id','date_fin')
9
10 class CateDosSerializer(serializers.ModelSerializer):
11 class Meta:
12 model = CategorieDossier
13 # field = ('titre','lien_vers_site','images','extrait_contenu','categorie','date_creation')
14