--- /dev/null
+# -*- encoding: utf-8 -*-
+from django.contrib import admin
+from models import Actualite, Discipline
+
+admin.site.register (Actualite)
+admin.site.register (Discipline)
+
+
class Discipline(models.Model):
id = models.IntegerField(primary_key=True, db_column='id_discipline')
nom = models.CharField(max_length=765, db_column='nom_discipline')
+
+ def __unicode__ (self):
+ return "Discipline: %s" % self.nom
+
class Meta:
db_table = u'discipline'
ordering = ["nom",]
date = models.DateField(db_column='date_actualite')
visible = models.CharField(max_length=3, db_column='visible_actualite')
ancienid = models.IntegerField(db_column='ancienId_actualite') # Field name made lowercase.
+
+ def __unicode__ (self):
+ return "Actualite %d: %s" % (self.id, self.titre)
+
class Meta:
db_table = u'actualite'
ordering = ["-date",]
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
+ 'django_roa',
+ 'auf_roa_authentification_backend',
'savoirs',
)
os.path.join(os.path.dirname(__file__), "templates"),
)
-
+AUTHENTICATION_BACKENDS = (
+ 'auf_roa_authentification_backend.backends.CascadeBackend',
+)
+AUTH_PASSWORD_REQUIRED=True
+ROA_MODELS = True # set to False if you'd like to develop/test locally
+ROA_FORMAT = 'django'
+ROA_HEADERS = {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+}
+ROA_DJANGO_ERRORS = True # useful to ease debugging if you use test server
+
+ROA_BASE_URL = 'https://authentification.auf.org/auth/'
+SERIALIZATION_MODULES = {
+ 'django' : 'auf_roa_authentification_backend.serializers',
+}
[buildout]
parts = django
find-links = http://pypi.auf.org/auf_savoirs_en_partage_backend/
+ http://pypi.auf.org/auf_roa_authentification_backend/
[django]
recipe = djangorecipe
settings = production
extra-paths = auf_savoirs_en_partage_django
eggs = auf_savoirs_en_partage_backend
+ auf_roa_authentification_backend