--- /dev/null
+.*.swp
+*.pyc
+*.pyo
+*.db
+conf.py
--- /dev/null
+import os
+
+DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'auf_zap.db') # Or path to database file if using sqlite3.
+DATABASE_USER = '' # Not used with sqlite3.
+DATABASE_PASSWORD = '' # Not used with sqlite3.
+DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
--- /dev/null
+from django.db import models
+
+# Create your models here.
--- /dev/null
+"""
+This file demonstrates two different styles of tests (one doctest and one
+unittest). These will both pass when you run "manage.py test".
+
+Replace these with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.failUnlessEqual(1 + 1, 2)
+
+__test__ = {"doctest": """
+Another way to test that 1 + 1 is equal to 2.
+
+>>> 1 + 1 == 2
+True
+"""}
+
--- /dev/null
+# Create your views here.
--- /dev/null
+from auf_zap.formations.models import *
+from django.contrib import admin
+
+class LangueFormationInline(admin.TabularInline):
+ model = LangueFormation
+ extra = 3
+
+#class PartenaireInline(admin.StackedInline):
+# model = Universite
+# extra = 3
+
+class FormationAdmin(admin.ModelAdmin):
+ #fieldsets = [
+ # (None, {'fields': ['question']}),
+ # ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),
+ #]
+ #inlines = [LangueFormationInline, PartenaireInline]
+ inlines = [LangueFormationInline]
+ list_display = ('nom_diplome','niveau_diplome','universite_accueil','bourses_aides')
+ list_filter = ['niveau_diplome','universite_accueil']
+
+admin.site.register(NiveauDiplome)
+admin.site.register(TypeDiplome)
+admin.site.register(ReconnaissanceDiplome)
+admin.site.register(DomaineScientifique)
+admin.site.register(Specialisation)
+admin.site.register(Langue)
+admin.site.register(Pays)
+admin.site.register(Universite)
+admin.site.register(TypeSelection)
+admin.site.register(TypeFormation)
+admin.site.register(Formation, FormationAdmin)
--- /dev/null
+# -*- coding: utf-8 -*-
+from django.db import models
+
+class NiveauDiplome(models.Model):
+ label = models.CharField(u'Niveau de diplôme', max_length=100)
+ niveau = models.IntegerField(u'Niveau')
+
+ def __unicode__(self):
+ return u'%s (%d an%s)' % (self.label, self.niveau, self.niveau>0 and 's' or '')
+
+ class Meta:
+ ordering = ('niveau',)
+
+class TypeDiplome(models.Model):
+ label = models.CharField(u'Type de diplôme', max_length=100)
+
+ def __unicode__(self):
+ return self.label
+
+ class Meta:
+ ordering = ('label',)
+
+class ReconnaissanceDiplome(models.Model):
+ label = models.CharField(u'Reconnaissance du diplôme', max_length=100)
+
+ def __unicode__(self):
+ return self.label
+
+ class Meta:
+ ordering = ('label',)
+
+class DomaineScientifique(models.Model):
+ label = models.CharField(u'Domaine scientifique', max_length=100)
+ code = models.IntegerField(u'Code')
+
+ def __unicode__(self):
+ return u'%d %s' % (self.code, self.label)
+
+ class Meta:
+ ordering = ('code',)
+
+class Specialisation(models.Model):
+ domaine = models.ForeignKey(DomaineScientifique)
+ label = models.CharField(u'Spécialisation', max_length=100)
+ code = models.IntegerField(u'Code')
+
+ def __unicode__(self):
+ return u'%d.%d %s' % (self.domaine.code, self.code, self.label)
+
+ class Meta:
+ ordering = ('domaine','code')
+
+class Langue(models.Model):
+ label = models.CharField(u'Langue', max_length=40)
+
+ def __unicode__(self):
+ return self.label
+
+ class Meta:
+ ordering = ('label',)
+
+class Pays(models.Model):
+ label = models.CharField(u'Pays', max_length=80)
+
+ def __unicode__(self):
+ return self.label
+
+ class Meta:
+ ordering = ('label',)
+
+class Universite(models.Model):
+ label = models.CharField(u'Université', max_length=200)
+ pays = models.ForeignKey(Pays)
+ ville = models.CharField(u'Ville', max_length=80)
+
+ def __unicode__(self):
+ return u'%s — %s' % (self.pays, self.label)
+
+ class Meta:
+ ordering = ('pays','label')
+
+class TypeSelection(models.Model):
+ label = models.CharField(u'Type de sélection', max_length=80)
+
+ def __unicode__(self):
+ return self.label
+
+ class Meta:
+ ordering = ('label',)
+
+class TypeFormation(models.Model):
+ label = models.CharField(u'Type de formation', max_length=100)
+
+ def __unicode__(self):
+ return self.label
+
+ class Meta:
+ ordering = ('label',)
+
+class Formation(models.Model):
+ nom_diplome = models.CharField(u'Nom du diplôme', max_length=200)
+ niveau_diplome = models.ForeignKey(NiveauDiplome)
+ domaine_scientifique = models.ForeignKey(DomaineScientifique)
+ specialisation = models.ForeignKey(Specialisation)
+ langues = models.ManyToManyField(Langue)
+ annee_creation = models.DateField(u'Année de création de la formation')
+ duree_en_mois = models.IntegerField(u'Durée de la formation (en mois)')
+ nom_responsable = models.CharField(u'Nom du responsable', max_length=100)
+ nom_co_responsable = models.CharField(u'Nom du co-responsable', max_length=100)
+ adresse_postale = models.CharField(u'Adresse postale', max_length=200)
+ adresse_electronique = models.CharField(u'Adresse électronique', max_length=100)
+ telephone = models.CharField(u'Téléphone', max_length=20)
+ telecopie = models.CharField(u'Télécopie', max_length=20)
+ site_web = models.CharField('Site web', max_length=200)
+ universite_accueil = models.ForeignKey(Universite, related_name='universite_accueil')
+ partenaires = models.ManyToManyField(Universite)
+ type_diplome = models.ForeignKey(TypeDiplome)
+ reconnaissance_diplome = models.ForeignKey(ReconnaissanceDiplome)
+ indications_cout = models.CharField(u'Indications de coût', max_length=200)
+ bourses_aides = models.CharField(u'Bourses et/ou aides', max_length=200)
+ pre_requis = models.CharField(u'Pré-requis', max_length=200)
+ type_selection = models.ForeignKey(TypeSelection)
+ type_formation = models.ForeignKey(TypeFormation)
+ #photo = models.File()
+
+ def __unicode__(self):
+ return self.nom_diplome
+
+ class Meta:
+ ordering = ('nom_diplome',)
+
+class LangueFormation(models.Model):
+ langue = models.ForeignKey(Langue)
+ formation = models.ForeignKey(Formation)
+ pourcentage = models.IntegerField(u"Pourcentage d'utilisation")
+
+ def __unicode__(self):
+ return u'%s (%s)' % (self.langue, self.pourcentage)
+
+ class Meta:
+ ordering = ('formation', 'pourcentage')
+
--- /dev/null
+"""
+This file demonstrates two different styles of tests (one doctest and one
+unittest). These will both pass when you run "manage.py test".
+
+Replace these with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.failUnlessEqual(1 + 1, 2)
+
+__test__ = {"doctest": """
+Another way to test that 1 + 1 is equal to 2.
+
+>>> 1 + 1 == 2
+True
+"""}
+
--- /dev/null
+from django.conf.urls.defaults import *
+from auf_zap.formations.models import Formation
+
+info_dict = {
+ 'queryset': Formation.objects.all(),
+}
+
+urlpatterns = patterns('',
+ (r'^$', 'django.views.generic.list_detail.object_list', info_dict),
+ (r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict),
+)
--- /dev/null
+from django.shortcuts import render_to_response, get_object_or_404
+from auf_zap.formations.models import Formation
+
+def index(request):
+ #dernieres_formations = Formation.objects.all().order_by('-date_enregistrement')[:5]
+ return render_to_response('formations/index.html', {})
+
+def detail(request, formation_id):
+ f = get_object_or_404(Formation, pk=formation_id)
+ return render_to_response('formations/detail.html', {'formation': f})
+
--- /dev/null
+#!/usr/bin/python
+from django.core.management import execute_manager
+try:
+ import settings # Assumed to be in the same directory.
+except ImportError:
+ import sys
+ sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
+ sys.exit(1)
+
+if __name__ == "__main__":
+ execute_manager(settings)
--- /dev/null
+/* elements */
+body { margin:0; padding:0; background:#fff; color:#454545; font:0.8em verdana, arial, helvetica, sans-serif; }
+
+h2 { margin:0px; padding:0; background:inherit; color:#d15517; font:normal 190% "trebuchet ms", verdana, arial, helvetica, sans-serif; }
+h3, h4, h5 { margin:10px 0 0 10px; padding:0; background:inherit; color:#5f5f5f; font:normal 170% "trebuchet ms", verdana, arial, helvetica, sans-serif; }
+
+a:link, a:visited { background:inherit; color:#0643bb; text-decoration:underline; }
+a:active { background:inherit; color:#990000; text-decoration:none; }
+a:hover { background:inherit; color:#d15517; text-decoration:none; }
+
+a img { border:none; }
+
+form { margin:8px 17px 0 0; padding:0px; }
+table { margin:10px; border-collapse:collapse; padding:5px; }
+th { height:28px; border-top:2px solid #d0e8f8; padding:0 10px; background-color:#e7f1f8; font-size:16px; text-align:left; }
+th.nombre { padding-right:0px; text-align:right; }
+
+table.sortable .odd { background-color:#E9F4F7; }
+
+/* id */
+#loadingbox { display:none; position:absolute; width:100%; }
+#loading { width:200px; margin:auto; background:#f5e86e; text-align:center; }
+
+#wrapper { float:left; width:100%; margin:0 auto 0 auto; padding:0; }
+
+#header { float:left; width:96%; padding:2%; background:#f8fbfd; color:#5f5f5f; }
+#banner { float:left; width:80%; }
+#banner img { float:left; padding-right:2%; }
+#banner h1 { margin:0; padding:0; font:normal 220% "trebuchet ms", verdana, arial, helvetica, sans-serif; }
+#banner h1 a, h1 a:visited { background:inherit; color:#5f5f5f; text-decoration:none; }
+#banner h1 a:hover { background:inherit; color:#d15517; text-decoration:none; }
+#banner h2 { margin:0; padding:0; }
+
+#menu { float:left; width:20%; text-align:right; font:bold 120% "trebuchet ms", verdana, arial, helvetica, sans-serif; }
+#menu ul { list-style-type:none; }
+#menu li { list-style-type:none; }
+#menu a { text-decoration:none; }
+
+#topmenu { float:left; width:96%; margin:0; border-bottom:1px dotted #bbd8ec; border-top:1px dotted #bbd8ec;
+ padding:8px 2% 8px 2%; background:#e7f1f8 url(/media/images/menubck.png); color:#000; text-align:center;
+}
+#topmenu ul { margin:0 0 0 14px; padding:0; list-style-type:none; }
+#topmenu li { display:inline; margin:0; padding:0; list-style-type:none; }
+#topmenu a, #topmenu a:visited {
+ margin:0 0 0 -5px; border:1px dotted #bbd8ec; padding:8px 20px 8px 20px;
+ background:#e7f1f8 url(/media/images/menubck.png);
+ color:#5f5f5f; text-align:center; text-decoration:none; font:bold 130% "trebuchet ms", verdana, arial, helvetica, sans-serif;
+}
+#topmenu a:hover { background:#fff; color:#d15517; }
+#topmenu a#last { border-right:1px dotted #bbd8ec; }
+
+#menuregion { width:100%; text-align:center; vertical-align:middle; }
+#menuregion span { margin-right:10px; }
+#menuregion input { position:relative; top:2px; }
+
+#main { float:left; width:96%; padding:2%; }
+#main p { margin:0; padding:4px 10px 0 17px; line-height:1.4em; }
+#main .gauche { float:left; width:46%; }
+#main .droite { float:left; width:46%; }
+#main .clear { clear:both; }
+
+#footer {
+ clear:both; float:left; width:100%; margin:20px 0 0 0; border-top: 1px dotted #bbd8ec; border-bottom: 1px dotted #bbd8ec; padding: 10px 0 6px 0;
+ background: #e7f1f8 url(/media/images/menubck.png); color:#404040; text-align:center;
+}
+#footer p { margin:0; padding:0 0 3px 0; font:normal 100% "trebuchet ms", verdana, arial, helvetica, sans-serif; }
+
+#username, #password { margin:5px; border:1px solid #CCC; padding:2px; background:#FAFAFA; font-weight:bold; }
+
+#recherche { margin:auto; margin:5px; text-align:center; }
+#recherche input { margin:5px; border:1px solid #CCC; padding-left:25px; background:#FAFAFA url(/media/images/zoom.png) no-repeat; background-position:3px 3px; font-size:16px; font-weight:bold; text-align:left; }
+
+#brdcrmb { float:left; width:98%; margin:20px 0 50px 16px; padding:0; background:inherit; color:#4d4d4d; font:normal 100% verdana, arial, helvetica, sans-serif; }
+#brdcrmb a, #brdcrmb a:visited { background:inherit; color:#0643bb; text-decoration:underline; }
+#brdcrmb a:hover, .bxtitle a:hover { background:inherit; color:#d15517; text-decoration:none; }
+
+/* class */
+.img { float:left; margin:4px 6px 3px 4px; padding:2px; }
+.subtitle { margin:12px 0 0 17px; padding:0; background:inherit; color:#5f5f5f; font:normal 1.4em verdana, arial, helvetica, sans-serif; }
+.red { background: inherit; color: #d15517; }
+.search { margin:0; border:1px dotted #e1e1e1; padding:2px; background:#fcfcfc; color:#7d7d7d; }
+.button { cursor:pointer; border:solid 1px #e1e1e1; background: #e7f1f8 url(/media/images/srcbck.png); color: #5f5f5f; font:bold 120% "trebuchet ms",verdana, arial, helvetica, sans-serif; }
+
+.pagebox { float:left; width:100%; margin:30px 0 0 0; padding:8px 0 8px 0; background:inherit; color:#fff; text-align:right; }
+.pagebox a, .buttonbox a { margin:0 2px 0 0; border:1px dotted #bbd8ec; padding:4px 8px 4px 8px; background: #e7f1f8 url(images/srcbck.png); color:#5f5f5f;
+ font:bold 120% "trebuchet ms", verdana, arial, helvetica, sans-serif; text-decoration:none;
+}
+.pagebox a:hover, .buttonbox a:hover { background: #fff; color:#d15517; text-decoration:none; }
+
+.menubox { float:left; width:100%; margin: 30px 0 40px 0; padding:6px 0 6px 0; }
+.menu1 { display:inline; float:left; width:31%; margin-left:1.7%; padding:2px 0 6px 0; background:#e7f1f8 url(/media/images/mnubck.png); color: #454545; }
+.menu2, .menu3 { float:left; width:31%; margin-left:1.6%; padding:2px 0 6px 0; background:#e7f1f8 url(/media/images/mnubck.png); color: #454545; }
+.menu1 p, .menu2 p, .menu3 p { margin:0; padding:0 6px 0 6px; font:normal 90% verdana, arial, helvetica, sans-serif; }
+
+.bxtitle { margin:0 0 0 6px; padding: 2px 0 0 0; background:inherit; color:#454545; font:normal 140% "trebuchet ms", verdana, arial, helvetica, sans-serif; }
+.liste td { padding:5px; border-top:1px solid #d0e8f8; }
+.pair td { background-color:#e7f1f8 }
+
+.groupWrapper { float:left; width:100%; min-height:400px; margin:auto; }
+.groupWrapper p { height:1px; margin:0; padding:0; overflow:hidden; }
+.groupItem { margin-bottom:20px; }
+.groupItem .itemHeader { cursor:move; position:relative; height:28px; border-top:2px solid #d0e8f8; padding:0 10px; background-color:#e7f1f8;
+ color:#000; font-weight:bold; font-size:16px; line-height:28px;
+}
+.groupItem .itemHeader a { position:absolute; top:0px; right:10px; font-weight:normal; font-size:11px; text-decoration:none; }
+
+.sortHelper { width:auto !important; border:3px dashed #666; }
+.itemContent { padding:10px; }
+
+.verticaltext{ -moz-transform: rotate(90deg); }
+
+.participants li {height: 50px; list-style-type:none;}
+.participants li>img {float:left; margin-right:8px; border:1px solid #999}
+
+.iconeSQI { width:16px; padding:0px 2px; }
+.commentSQI { width:100%; margin-right:5px; text-align:right; font-size:8px; }
+.descriptionSQI { width:45%; padding:10px; }
--- /dev/null
+from django.db import models
+
+# Create your models here.
--- /dev/null
+"""
+This file demonstrates two different styles of tests (one doctest and one
+unittest). These will both pass when you run "manage.py test".
+
+Replace these with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.failUnlessEqual(1 + 1, 2)
+
+__test__ = {"doctest": """
+Another way to test that 1 + 1 is equal to 2.
+
+>>> 1 + 1 == 2
+True
+"""}
+
--- /dev/null
+# Create your views here.
--- /dev/null
+# Django settings for auf_zap project.
+
+import os
+from conf import *
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+ # ('Your Name', 'your_email@domain.com'),
+)
+
+MANAGERS = ADMINS
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'Asia/Ho_Chi_Minh'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = 'fr-fr'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash if there is a path component (optional in other cases).
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
+MEDIA_URL = '/media/'
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/admin/media/'
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ 'django.template.loaders.filesystem.load_template_source',
+ 'django.template.loaders.app_directories.load_template_source',
+# 'django.template.loaders.eggs.load_template_source',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+)
+
+ROOT_URLCONF = 'auf_zap.urls'
+
+TEMPLATE_DIRS = (
+ # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
+ # Always use forward slashes, even on Windows.
+ # Don't forget to use absolute paths, not relative paths.
+ os.path.join(os.path.dirname(__file__), 'templates'),
+)
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.admin',
+ 'auf_zap.formations',
+)
--- /dev/null
+{% extends "admin/base.html" %}
+
+{% block title %}{{ title }} | AUF — ZAP — Administration{% endblock %}
+
+{% block branding %}
+<h1 id="site-name">AUF — ZAP — Administration</h1>
+{% endblock %}
+
+{% block nav-global %}{% endblock %}
--- /dev/null
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
+
+{% block coltype %}colMS{% endblock %}
+
+{% block bodyclass %}dashboard{% endblock %}
+
+{% block breadcrumbs %}{% endblock %}
+
+{% block content %}
+<div id="content-main">
+
+{% if app_list %}
+ {% for app in app_list %}
+ <div class="module">
+ <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
+ <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</a></caption>
+ {% for model in app.models %}
+ <tr>
+ {% if model.perms.change %}
+ <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
+ {% else %}
+ <th scope="row">{{ model.name }}</th>
+ {% endif %}
+
+ {% if model.perms.add %}
+ <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
+ {% else %}
+ <td> </td>
+ {% endif %}
+
+ {% if model.perms.change %}
+ <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
+ {% else %}
+ <td> </td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ {% endfor %}
+{% else %}
+ <p>{% trans "You don't have permission to edit anything." %}</p>
+{% endif %}
+</div>
+{% endblock %}
+
+{% block sidebar %}
+<div id="content-related">
+ <div class="module" id="recent-actions-module">
+ <h2>{% trans 'Recent Actions' %}</h2>
+ <h3>{% trans 'My Actions' %}</h3>
+ {% load log %}
+ {% get_admin_log 10 as admin_log for_user user %}
+ {% if not admin_log %}
+ <p>{% trans 'None available' %}</p>
+ {% else %}
+ <ul class="actionlist">
+ {% for entry in admin_log %}
+ <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
+ {% if entry.is_deletion %}
+ {{ entry.object_repr }}
+ {% else %}
+ <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
+ {% endif %}
+ <br/>
+ {% if entry.content_type %}
+ <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
+ {% else %}
+ <span class="mini quiet">{% trans 'Unknown content' %}</span>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+</div>
+{% endblock %}
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xml:lang="fr">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>{% block title %}AUF — ZAP{% endblock %}</title>
+ <link href="{{ MEDIA_URL }}images/favicon.ico" rel="shortcut icon" />
+ <link href="{{ MEDIA_URL }}css/style.css" rel="stylesheet" type="text/css" media="screen" />
+ {% block css %}{% endblock %}
+ {% block js %}{% endblock %}
+</head>
+<body>
+<div id="loadingbox"><div id="loading">En chargement...</div></div>
+<div id="header">
+ <div id="banner">
+ <a href="http://www.auf.org/regions/asie-pacifique/"><img src="{{ MEDIA_URL }}images/logo_auf.gif" alt="logo AUF"/></a>
+ <h1>Annuaire des formations<br />issues des coopérations avec<br />des universités francophones</h1>
+ <h2>{% block sous_titre %}{% endblock %}</h2>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="/">Accueil</a></li>
+ </ul>
+ </div>
+</div>
+<div id="topmenu">
+ <ul>
+ {% block topmenu %}
+ {% endblock %}
+ </ul>
+</div>
+<div id="main">
+ {% block main %}
+ {% endblock %}
+</div>
+<div id="footer">
+ {% block footer %}
+ <p id="test-popup">AUF - 2010</p>
+ {% endblock %}
+</div>
+</body>
+</html>
--- /dev/null
+{% extends "formations/base.html" %}
+
+{% block title %}{{ title }} | AUF — ZAP — Formations{% endblock %}
+
+{% block branding %}
+<h1 id="site-name">AUF — ZAP — Formations</h1>
+{% endblock %}
+
+{% block nav-global %}{% endblock %}
--- /dev/null
+{% extends "formations/base_site.html" %}
+{% load i18n %}
+
+{% block main %}
+<div id="content-main">
+
+{% if object_list %}
+ <h1>Liste des formations</h1>
+ <ul>
+ {% for formation in object_list %}
+ <li><a href="/formations/{{ formation.id }}">{{ formation }}</a></li>
+ {% endfor %}
+ </ul>
+{% else %}
+ <p>Aucune formation.</p>
+{% endif %}
+
+</div>
+{% endblock %}
--- /dev/null
+{% extends "base_site.html" %}
+{% load i18n %}
+
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load media %}{% media_prefix %}css/dashboard.css" />{% endblock %}
+
+{% block coltype %}colMS{% endblock %}
+
+{% block bodyclass %}dashboard{% endblock %}
+
+{% block breadcrumbs %}{% endblock %}
+
+{% block content %}
+<div id="content-main">
+
+{% if app_list %}
+ {% for app in app_list %}
+ <div class="module">
+ <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
+ <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</a></caption>
+ {% for model in app.models %}
+ <tr>
+ {% if model.perms.change %}
+ <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
+ {% else %}
+ <th scope="row">{{ model.name }}</th>
+ {% endif %}
+
+ {% if model.perms.add %}
+ <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
+ {% else %}
+ <td> </td>
+ {% endif %}
+
+ {% if model.perms.change %}
+ <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
+ {% else %}
+ <td> </td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ {% endfor %}
+{% else %}
+ <p>{% trans "You don't have permission to edit anything." %}</p>
+{% endif %}
+</div>
+{% endblock %}
+
+{% block sidebar %}
+<div id="content-related">
+ <div class="module" id="recent-actions-module">
+ <h2>{% trans 'Recent Actions' %}</h2>
+ <h3>{% trans 'My Actions' %}</h3>
+ {% load log %}
+ {% get_admin_log 10 as admin_log for_user user %}
+ {% if not admin_log %}
+ <p>{% trans 'None available' %}</p>
+ {% else %}
+ <ul class="actionlist">
+ {% for entry in admin_log %}
+ <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
+ {% if entry.is_deletion %}
+ {{ entry.object_repr }}
+ {% else %}
+ <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
+ {% endif %}
+ <br/>
+ {% if entry.content_type %}
+ <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
+ {% else %}
+ <span class="mini quiet">{% trans 'Unknown content' %}</span>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+</div>
+{% endblock %}
--- /dev/null
+from django.conf.urls.defaults import *
+from django.conf import settings
+
+from django.contrib import admin
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ (r'^formations/', include('auf_zap.formations.urls')),
+
+ # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
+ # to INSTALLED_APPS to enable admin documentation:
+ # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+ # Uncomment the next line to enable the admin:
+ (r'^admin/', include(admin.site.urls)),
+ (r'^media/(?P<path>.*)$', 'django.views.static.serve',
+ {'document_root': settings.MEDIA_ROOT}),
+)