template + structure django CMS
authormarc.nachin <you@example.commarc.nachin@auf.org>
Fri, 5 Oct 2012 16:01:06 +0000 (18:01 +0200)
committermarc.nachin <you@example.commarc.nachin@auf.org>
Fri, 5 Oct 2012 16:01:06 +0000 (18:01 +0200)
35 files changed:
buildout.cfg
project/article/__init__.py [new file with mode: 0755]
project/article/admin.py [new file with mode: 0644]
project/article/context_processors.py [new file with mode: 0644]
project/article/migrations/0001_initial.py [new file with mode: 0644]
project/article/migrations/0002_auto__add_publication__chg_field_actualite_date_pub.py [new file with mode: 0644]
project/article/migrations/__init__.py [new file with mode: 0644]
project/article/models.py [new file with mode: 0755]
project/article/tests.py [new file with mode: 0755]
project/article/views.py [new file with mode: 0755]
project/diaporama/context_processors.py [new file with mode: 0644]
project/diaporama/views.py
project/feeds.py [new file with mode: 0644]
project/media/actualite/IFGU.png [new file with mode: 0755]
project/media/actualite/IFGU_1.png [new file with mode: 0755]
project/media/actualite/mauvaisediapo2_1.png [new file with mode: 0755]
project/media/slider/mauvaisediapo2_1.png [new file with mode: 0755]
project/media/slider/mauvaisediapo_1.png [new file with mode: 0755]
project/settings.py
project/static/css/style.css
project/static/img/autre.png [new file with mode: 0755]
project/static/img/less.png [new file with mode: 0644]
project/static/img/logoActu.png
project/static/img/mail.png [new file with mode: 0644]
project/static/img/more.png [new file with mode: 0644]
project/static/img/pdf.png [new file with mode: 0644]
project/static/img/print.png [new file with mode: 0644]
project/templates/accueil.html
project/templates/actualite_detail.html [new file with mode: 0755]
project/templates/actualites.html [new file with mode: 0755]
project/templates/base.html
project/templates/page.html [new file with mode: 0644]
project/templates/sitemap.html [new file with mode: 0644]
project/urls.py
versions.cfg

index 9663877..c747b77 100644 (file)
@@ -16,6 +16,7 @@ eggs =
     south
     django-admin-tools
     django-cms
+    django-pagination
 
 [django]  
 recipe = auf.recipe.django 
diff --git a/project/article/__init__.py b/project/article/__init__.py
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/project/article/admin.py b/project/article/admin.py
new file mode 100644 (file)
index 0000000..3c5153d
--- /dev/null
@@ -0,0 +1,45 @@
+# coding: utf8
+from project.article.models import *
+from django.db import models
+from django.contrib import admin
+
+
+class ActualiteAdmin(admin.ModelAdmin):
+    prepopulated_fields = {'slug': ['titre']}
+    fieldsets = [
+        ('Article', {'fields': ['status', 'date_pub', 'titre', 'slug', 'image', 'texte'], 'classes': ['wide']}),
+    ]
+    
+    def show_image2(self, obj):
+        if obj.image:
+            return "<img src='../../../media/%s' style='height:40px;'>" % obj.image
+        else:
+            return "<img src='../../../static/img/logoActu.png' style='height:40px;'>"
+    show_image2.allow_tags = True #permet de sortir du html#
+    show_image2.short_description = 'Image'
+
+    list_display = ('status', 'show_image2', 'titre', 'date_pub')
+    list_display_links = ('status', 'titre')
+    search_fields = ['titre']
+    
+class PublicationAdmin(admin.ModelAdmin):
+    prepopulated_fields = {'slug': ['titre']}
+    fieldsets = [
+        ('Article', {'fields': ['status', 'date_pub', 'titre', 'slug', 'image', 'texte'], 'classes': ['wide']}),
+    ]
+    
+    def show_image2(self, obj):
+        if obj.image:
+            return "<img src='../../../media/%s' style='height:40px;'>" % obj.image
+        else:
+            return "<img src='../../../static/img/logoActu.png' style='height:40px;'>"
+    show_image2.allow_tags = True #permet de sortir du html#
+    show_image2.short_description = 'Image'
+
+    list_display = ('status', 'show_image2', 'titre', 'date_pub')
+    list_display_links = ('status', 'titre')
+    search_fields = ['titre']
+
+
+admin.site.register(Actualite, ActualiteAdmin)
+admin.site.register(Publication, PublicationAdmin)
\ No newline at end of file
diff --git a/project/article/context_processors.py b/project/article/context_processors.py
new file mode 100644 (file)
index 0000000..413e9b0
--- /dev/null
@@ -0,0 +1,10 @@
+from article.models import Actualite
+from django.template import Context, RequestContext
+import datetime
+
+
+def list_actu(request):
+    list = Actualite.objects.filter(status=3)
+    return {
+        'actu_list' : list
+    }
\ No newline at end of file
diff --git a/project/article/migrations/0001_initial.py b/project/article/migrations/0001_initial.py
new file mode 100644 (file)
index 0000000..ad0b05c
--- /dev/null
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        # Adding model 'Actualite'
+        db.create_table('article_actualite', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('titre', self.gf('django.db.models.fields.CharField')(max_length=200)),
+            ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
+            ('texte', self.gf('django.db.models.fields.TextField')()),
+            ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True)),
+            ('date_pub', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
+            ('date_mod', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+            ('status', self.gf('django.db.models.fields.CharField')(default='3', max_length=1)),
+        ))
+        db.send_create_signal('article', ['Actualite'])
+
+
+    def backwards(self, orm):
+        # Deleting model 'Actualite'
+        db.delete_table('article_actualite')
+
+
+    models = {
+        'article.actualite': {
+            'Meta': {'ordering': "('-date_pub',)", 'object_name': 'Actualite'},
+            'date_mod': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'date_pub': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+            'status': ('django.db.models.fields.CharField', [], {'default': "'3'", 'max_length': '1'}),
+            'texte': ('django.db.models.fields.TextField', [], {}),
+            'titre': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+        }
+    }
+
+    complete_apps = ['article']
\ No newline at end of file
diff --git a/project/article/migrations/0002_auto__add_publication__chg_field_actualite_date_pub.py b/project/article/migrations/0002_auto__add_publication__chg_field_actualite_date_pub.py
new file mode 100644 (file)
index 0000000..493d255
--- /dev/null
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        # Adding model 'Publication'
+        db.create_table('article_publication', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('titre', self.gf('django.db.models.fields.CharField')(max_length=200)),
+            ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
+            ('texte', self.gf('django.db.models.fields.TextField')()),
+            ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True)),
+            ('date_pub', self.gf('django.db.models.fields.DateField')()),
+            ('date_mod', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+            ('status', self.gf('django.db.models.fields.CharField')(default='3', max_length=1)),
+        ))
+        db.send_create_signal('article', ['Publication'])
+
+
+        # Changing field 'Actualite.date_pub'
+        db.alter_column('article_actualite', 'date_pub', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2012, 10, 5, 0, 0)))
+
+    def backwards(self, orm):
+        # Deleting model 'Publication'
+        db.delete_table('article_publication')
+
+
+        # Changing field 'Actualite.date_pub'
+        db.alter_column('article_actualite', 'date_pub', self.gf('django.db.models.fields.DateField')(null=True))
+
+    models = {
+        'article.actualite': {
+            'Meta': {'ordering': "('-date_pub',)", 'object_name': 'Actualite'},
+            'date_mod': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'date_pub': ('django.db.models.fields.DateField', [], {}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+            'status': ('django.db.models.fields.CharField', [], {'default': "'3'", 'max_length': '1'}),
+            'texte': ('django.db.models.fields.TextField', [], {}),
+            'titre': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+        },
+        'article.publication': {
+            'Meta': {'ordering': "('-date_pub',)", 'object_name': 'Publication'},
+            'date_mod': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'date_pub': ('django.db.models.fields.DateField', [], {}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+            'status': ('django.db.models.fields.CharField', [], {'default': "'3'", 'max_length': '1'}),
+            'texte': ('django.db.models.fields.TextField', [], {}),
+            'titre': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+        }
+    }
+
+    complete_apps = ['article']
\ No newline at end of file
diff --git a/project/article/migrations/__init__.py b/project/article/migrations/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/project/article/models.py b/project/article/models.py
new file mode 100755 (executable)
index 0000000..ed1f93b
--- /dev/null
@@ -0,0 +1,37 @@
+from django.db import models
+
+class Actualite(models.Model):
+    titre = models.CharField(max_length=200)
+    slug = models.SlugField(unique=True)
+    texte = models.TextField()
+    image = models.ImageField(null=True, blank=True, upload_to='actualite')
+    date_pub = models.DateField()
+    date_mod = models.DateTimeField('date de derniere modification', auto_now_add=True)
+    status = models.CharField(max_length=1, null=False, default='3', blank=False, choices=(('1', 'En cours de redaction'), ('2', 'Propose a la publication'), ('3', 'Publie en Ligne'), ('4', 'A supprimer')))
+    
+    class Meta:
+        ordering = ('-date_pub',)
+    
+    def __unicode__(self):
+        return self.titre  
+
+    def get_absolute_url(self):
+        return "/actualites/%s/" %self.slug
+        
+class Publication(models.Model):
+    titre = models.CharField(max_length=200)
+    slug = models.SlugField(unique=True)
+    texte = models.TextField()
+    image = models.ImageField(null=True, blank=True, upload_to='actualite')
+    date_pub = models.DateField()
+    date_mod = models.DateTimeField('date de derniere modification', auto_now_add=True)
+    status = models.CharField(max_length=1, null=False, default='3', blank=False, choices=(('1', 'En cours de redaction'), ('2', 'Propose a la publication'), ('3', 'Publie en Ligne'), ('4', 'A supprimer')))
+    
+    class Meta:
+        ordering = ('-date_pub',)
+    
+    def __unicode__(self):
+        return self.titre  
+
+    def get_absolute_url(self):
+        return "/publications/%s/" %self.slug
\ No newline at end of file
diff --git a/project/article/tests.py b/project/article/tests.py
new file mode 100755 (executable)
index 0000000..501deb7
--- /dev/null
@@ -0,0 +1,16 @@
+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this 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.assertEqual(1 + 1, 2)
diff --git a/project/article/views.py b/project/article/views.py
new file mode 100755 (executable)
index 0000000..4f4d091
--- /dev/null
@@ -0,0 +1,18 @@
+# Create your views here.
+from article.models import Actualite
+from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
+from django.template import Context, RequestContext
+from django.shortcuts import redirect
+from django.http import HttpResponse
+from django.core.paginator import Paginator
+
+def actualite(request):
+    item_list = Actualite.objects.filter(status=3).order_by('-date_pub')
+    return render_to_response('actualites.html', {'actualite_list': item_list, 'page_title': 'Actualite'}, context_instance = RequestContext(request))
+
+def actualite_detail(request, slug):
+    p = get_object_or_404(Actualite, slug=slug)
+    return render_to_response('actualite_detail.html', {'actualite': p,'page_slug': 'actualites/', 'page_title': 'Actualite'}, context_instance = RequestContext(request))
+    
+def plan_du_site(request, slugRegion=''):
+    return render_to_response('sitemap.html', {'page_title': 'Plan du site'}, context_instance = RequestContext(request))
\ No newline at end of file
diff --git a/project/diaporama/context_processors.py b/project/diaporama/context_processors.py
new file mode 100644 (file)
index 0000000..bf3fc7e
--- /dev/null
@@ -0,0 +1,10 @@
+from diaporama.models import Slider
+from django.template import Context, RequestContext
+import datetime
+
+
+def list_slider(request):
+    list = Slider.objects.filter(status=3)
+    return {
+        'slider_list' : list
+    }
\ No newline at end of file
index a58f2a7..e69de29 100644 (file)
@@ -1,13 +0,0 @@
-from django.conf import settings
-from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
-from django.template import Context, RequestContext
-from django.shortcuts import redirect
-from django.http import HttpResponse
-from diaporama.models import Slider
-
-def accueil(request):
-    context = RequestContext(request)
-    item_list2 = Slider.filter(status=3).order_by('-date_pub')
-    import pdb; pdb.set_trace()
-
-    return render_to_response('accueil.html', {'slider_list': item_list2, 'page_title': 'diaporama'}, context_instance = RequestContext(request))
diff --git a/project/feeds.py b/project/feeds.py
new file mode 100644 (file)
index 0000000..bda72fb
--- /dev/null
@@ -0,0 +1,10 @@
+from django.contrib.syndication.feeds import Feed
+from article.models import Actualite
+
+class DerniereActualites(Feed):
+    title = "Actualite IFGU"
+    description = "Voila voila"
+    link = "/flux/actualite/"
+
+    def items(self):
+        return Actualite.objects.all()[:10]
\ No newline at end of file
diff --git a/project/media/actualite/IFGU.png b/project/media/actualite/IFGU.png
new file mode 100755 (executable)
index 0000000..c936a01
Binary files /dev/null and b/project/media/actualite/IFGU.png differ
diff --git a/project/media/actualite/IFGU_1.png b/project/media/actualite/IFGU_1.png
new file mode 100755 (executable)
index 0000000..c936a01
Binary files /dev/null and b/project/media/actualite/IFGU_1.png differ
diff --git a/project/media/actualite/mauvaisediapo2_1.png b/project/media/actualite/mauvaisediapo2_1.png
new file mode 100755 (executable)
index 0000000..51ce8b0
Binary files /dev/null and b/project/media/actualite/mauvaisediapo2_1.png differ
diff --git a/project/media/slider/mauvaisediapo2_1.png b/project/media/slider/mauvaisediapo2_1.png
new file mode 100755 (executable)
index 0000000..51ce8b0
Binary files /dev/null and b/project/media/slider/mauvaisediapo2_1.png differ
diff --git a/project/media/slider/mauvaisediapo_1.png b/project/media/slider/mauvaisediapo_1.png
new file mode 100755 (executable)
index 0000000..36d0044
Binary files /dev/null and b/project/media/slider/mauvaisediapo_1.png differ
index 6f5ccf9..7f3865c 100644 (file)
@@ -47,8 +47,10 @@ INSTALLED_APPS = (
     'django.contrib.admin',
     'django.contrib.staticfiles',
     'django.contrib.sites',
+    'django.contrib.sitemaps',
     'south',
     'diaporama',
+    'article',
 
     # django-cms
     'cms',
@@ -56,6 +58,7 @@ INSTALLED_APPS = (
     'menus',
     'south',
     'sekizai',
+    'pagination',
 
     # django-cms plugins
     'cms.plugins.text',
@@ -71,6 +74,7 @@ MIDDLEWARE_CLASSES = (
     'cms.middleware.page.CurrentPageMiddleware',
     'cms.middleware.user.CurrentUserMiddleware',
     'cms.middleware.toolbar.ToolbarMiddleware',
+    'pagination.middleware.PaginationMiddleware',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_TEMPLATE_CONTEXT_PROCESSORS + (
@@ -78,6 +82,8 @@ TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_TEMPLATE_CONTEXT_PROCESSORS + (
     'django.core.context_processors.request',
     'cms.context_processors.media',
     'sekizai.context_processors.sekizai',
+    'diaporama.context_processors.list_slider',
+    'article.context_processors.list_actu',
 )
 
 
@@ -91,6 +97,7 @@ ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
 
 CMS_TEMPLATES = (
         ('accueil.html', gettext('Page Accueil')),
+        ('page.html', gettext('Page Texte')),
 )
 
 from conf import *
index 0995954..13ac810 100644 (file)
@@ -70,6 +70,8 @@ H1{
        filter: dropshadow(color=#ffffff, offx=1, offy=1);
        margin-bottom: 20px;
        font-weight: bold;
+       line-height: 20px;
+       line-height: 28px;
 }
 
 H2{
@@ -291,16 +293,18 @@ header #degrade{
        text-align: left;
        -webkit-box-shadow: none;
        box-shadow: none;
-       height: 45px;
-       line-height: 45px;
+       line-height: 20px;
+       height: auto;
 }
 
 #principal ul li ul li a{
        display: block;
-       height: 45px;
+       height: auto;
        margin: 0px 20px 0px 20px;
-       padding: 0px 28px 0px 0px;
+       padding: 15px 18px 14px 0px;
        color: #fff;
+       max-width: 220px;
+       min-width: 88px;
        font-weight: normal;
        font-size: 13px;
        text-shadow: none;
@@ -316,7 +320,7 @@ header #degrade{
        -webkit-box-shadow: none;
        box-shadow: none; 
        background: none;
-       height: 45px;
+       height: auto;
        color: #82898f;
        border-bottom: 1px solid #82898f;
 }
@@ -353,8 +357,8 @@ content{
 }
 
 #gauche ul li{
-       margin-bottom: 24px;
-       line-height: 22px;
+       margin-bottom: 20px;
+       line-height: 20px;
        padding: 0px 0px 0px 22px;
        background: url(../img/puce.png) left center no-repeat;
 }
@@ -380,7 +384,9 @@ content{
 
 #gauche .gauche{
        float: left;
-       margin: 0px 10px 10px 0px;
+       margin: 6px 14px 10px 0px;
+       height: auto;
+       max-width: 376px;
 }
 
 #gauche .droite{
@@ -388,6 +394,133 @@ content{
        margin: 0px 0px 10px 10px;
 }
 
+/*actu*/
+#gauche .boiteContent{
+       width: 578px;
+       min-height: 20px;
+       padding: 2px 20px 0px 20px;
+       background-color: #f4f4f4;
+       border: 1px solid #cacaca;
+       -webkit-border-radius: 4px;
+       border-radius: 4px; 
+       -webkit-box-shadow: inset 0px 0px 0px 1px rgb(255, 255, 255);
+       box-shadow: inset 0px 0px 0px 1px rgb(255, 255, 255); 
+       margin-bottom: 18px;
+       text-shadow: 1px 1px 0px #ffffff;
+       filter: dropshadow(color=#ffffff, offx=1, offy=1);
+}
+
+.info{
+       width: 586px;
+       overflow: hidden;
+       height: 18px;
+       padding: 10px 16px 8px 16px;
+       background-color: #f4f4f4;
+       border: 1px solid #cacaca;
+       -webkit-border-radius: 4px;
+       border-radius: 4px; 
+       -webkit-box-shadow: inset 0px 0px 0px 1px rgb(255, 255, 255);
+       box-shadow: inset 0px 0px 0px 1px rgb(255, 255, 255); 
+       margin-bottom: 24px;
+       text-shadow: 1px 1px 0px #ffffff;
+       filter: dropshadow(color=#ffffff, offx=1, offy=1);
+}
+
+.info .date{
+       float: left;
+       line-height: 18px;
+       color: #810025;
+       font-size: 0.93em;
+       font-style: oblique;
+}
+
+.info .outils{
+       float: right;
+}
+
+.info .outils img{
+       border-right: 1px solid #ccc;
+       padding: 0px 6px;
+}
+
+.info .outils img:last-child{
+       border-right: none;
+       padding: 0px 0px 0px 6px;
+}
+
+#gauche .actu{
+       overflow: hidden;
+       margin: 16px 0px 16px 0px;
+}
+
+#gauche .actu H1{
+       font-size: 1.1em;
+       line-height: 20px;
+       margin-bottom: 16px;
+}
+
+#gauche .actu H1 a{
+       color: #2C3337;
+}
+
+#gauche .actu H1 a:hover{
+       color: #82898f;
+       -webkit-transition: 0.5s;
+       -moz-transition: 0.5s;
+       transition: 0.5s;
+}
+
+#gauche .actuImg{
+       float: left;
+       width: 104px;
+       margin-right: 18px;
+}
+
+#gauche .actuTxt{
+       float: left;
+       width: 456px;
+}
+
+#gauche .actuTxt p{
+       font-size: 0.94em;
+       line-height: 17px;
+       margin-bottom: 0px;
+}
+
+#gauche .actuTxt p a{
+       color: #2C3337;
+}
+
+#gauche .actuTxt p a:hover{
+       color: #82898f;
+       -webkit-transition: 0.5s;
+       -moz-transition: 0.5s;
+       transition: 0.5s;
+}
+
+#gauche .actuTxt span{
+       display: block;
+       width: 100%;
+       margin-top: 14px;
+}
+
+#gauche .actuTxt span a{
+       color: #810025;
+       font-style: italic;
+       font-size: 0.92em;
+}
+
+#gauche .actuImg img{
+       border: 2px solid #fff;
+}
+
+#gauche .actuImg img:hover{
+       border: 2px solid #CACACA;
+       -webkit-transition: 0.5s;
+       -moz-transition: 0.5s;
+       transition: 0.5s;
+}
+
 /*slider*/
 #slider{
        position: relative;
@@ -404,9 +537,8 @@ content{
 }
 
 #slides{
-       width: 606px;
-       height: 263px;
-       border: 1px solid #dddddd;
+       width: 578px;
+       height: 298px;
        position: relative;
 }
 
@@ -468,6 +600,10 @@ sidebar{
        font-weight: bold;
 }
 
+#droite H1 a{
+       color: #2C3337;
+}
+
 #droite .boite, #droite .boiteActu{
        width: 258px;
        min-height: 20px;
diff --git a/project/static/img/autre.png b/project/static/img/autre.png
new file mode 100755 (executable)
index 0000000..bde7038
Binary files /dev/null and b/project/static/img/autre.png differ
diff --git a/project/static/img/less.png b/project/static/img/less.png
new file mode 100644 (file)
index 0000000..65cd7af
Binary files /dev/null and b/project/static/img/less.png differ
index 2ec4224..14816bc 100644 (file)
Binary files a/project/static/img/logoActu.png and b/project/static/img/logoActu.png differ
diff --git a/project/static/img/mail.png b/project/static/img/mail.png
new file mode 100644 (file)
index 0000000..2e81eb4
Binary files /dev/null and b/project/static/img/mail.png differ
diff --git a/project/static/img/more.png b/project/static/img/more.png
new file mode 100644 (file)
index 0000000..6c17c54
Binary files /dev/null and b/project/static/img/more.png differ
diff --git a/project/static/img/pdf.png b/project/static/img/pdf.png
new file mode 100644 (file)
index 0000000..8e9e506
Binary files /dev/null and b/project/static/img/pdf.png differ
diff --git a/project/static/img/print.png b/project/static/img/print.png
new file mode 100644 (file)
index 0000000..e58b004
Binary files /dev/null and b/project/static/img/print.png differ
index ba2e974..09817ae 100644 (file)
@@ -3,42 +3,28 @@
 {% block Contenu %}
 
 <h1>À la une</h1>
-        <div id="slider">
-               <div id="slides">
-                <div class="diapo">
-                    <img src="{{ STATIC_URL }}img/diapo1.jpg" height="298" width="578">
-                    <div class="intro"><p>Le Recteur de l’AUF a participé à la 29ème session ordinaire du Conseil des ministres du CAMES</p></div>
-                </div>
-                <div class="diapo">
-                    <img src="{{ STATIC_URL }}img/diapo2.jpg" height="298" width="578">
-                    <div class="intro"><p>IPAGU : formation des Recteurs d’universités et des directeurs des grandes écoles du Mali à la gouvernance universitaire</p></div>
-                </div>
-            </div>  
-        </div>
-        <p>{{page_title}}</p>
-        {% if slider_list %}
-                        {% with slider_list as item_list %}
-                            {% for item in item_list %}
-                                 <div class="Item">
-                                        {% if item.lien %}<a href="{{ item.lien }}">{% endif %}<img src="{{ MEDIA_URL }}{{ item.image }}" width="607" height="220" alt="" />{% if item.lien %}</a>{% endif %}
-                                        <div id="BlocEnBref">
-                                        <div class="ConteneurEnBref">
-                                           <p class="Titre">{% if item.lien %}<a href="{{ item.lien }}">{% endif %}{{ item.titre }}{% if item.lien %}</a>{% endif %}</p>
-                                        </div>
-                                       </div>                        
-                                 </div>
-                             {% endfor %}
-                        {% endwith %}
-                     {% else%}
-                               <div class="Item2">
-                                <img src="{{ STATIC_URL }}documents/images/entetes/prix-wise-2010.jpg" width="607" height="220" alt="" /> 
-                               <div id="BlocEnBref">
-                                    <div class="ConteneurEnBref">
-                                       <p class="Titre">Pas de slider dans ce bureau</p>
-                                    </div>
-                               </div>
+
+       {% if slider_list%}
+       
+        {% with slider_list as item_list %}
+                <div id="slider">
+                    <div id="slides">
+                       {% for item in item_list %}
+                            <div class="diapo">
+                                 {% if item.lien %}<a href="{{ item.lien }}">{% endif %}<img src="{{ MEDIA_URL }}{{ item.image}}" height="298" width="578">{% if item.lien %}</a>{% endif %}
+                                <div class="intro"><p>{% if item.lien %}<a href="{{ item.lien }}">{% endif %}{{ item.titre }}{% if item.lien %}</a>{% endif %}</p></div>
                             </div>
-                      {% endif %}
+                       {% endfor %}
+                    </div>  
+                </div>
+         {% endwith %}
+         
+    {% else%}
+    
+          <p>Pas de slider</p>
+                            
+    {% endif %}
+        
         
         <div class="text">
         
diff --git a/project/templates/actualite_detail.html b/project/templates/actualite_detail.html
new file mode 100755 (executable)
index 0000000..e41217f
--- /dev/null
@@ -0,0 +1,24 @@
+{% extends "base.html" %}
+{% load i18n cms_tags %}
+
+{% block Contenu %}
+
+{% with actualite as item %}
+
+    <h1>{{ item.titre }}</h1>
+    
+       <div class="info">
+               <div class="date">Édité le {{ item.date_pub }}</div>
+            <div class="outils"><img src="{{ STATIC_URL }}img/more.png" /><img src="{{ STATIC_URL }}img/less.png" /><img src="{{ STATIC_URL }}img/print.png" /><img src="{{ STATIC_URL }}img/mail.png" /><img src="{{ STATIC_URL }}img/pdf.png" /></div>
+        </div>
+    
+       {% if item.image %}
+               <img src="{{ MEDIA_URL }}{{ item.image }}" class="gauche"/>
+       {% endif %}        
+        <div class="text">
+             <p>{{ item.texte|safe}}</p>         
+        </div>   
+            
+{% endwith %}  
+        
+{% endblock %}
\ No newline at end of file
diff --git a/project/templates/actualites.html b/project/templates/actualites.html
new file mode 100755 (executable)
index 0000000..f0c65ed
--- /dev/null
@@ -0,0 +1,36 @@
+{% extends "base.html" %}
+{% load i18n cms_tags pagination_tags%}
+
+
+{% block Contenu %}
+<h1>Actualités</h1>
+{% if actualite_list %}
+    {% with actualite_list as item_list %}
+            {% for item in item_list %}
+                <div class="boiteContent">
+                    <div class="actu">
+                                       <div class="actuImg">
+                                        <a href="{{ item.get_absolute_url }}">
+                                              {% if item.image %}
+                                              <img src="{{ MEDIA_URL }}{{ item.image }}" width="96" height="100" alt="{{ item.titre }}" title="{{ item.titre }}"/>
+                                              {% else %}
+                                              <img src="{{ STATIC_URL }}img/logoActu.png" width="96" height="100" alt="Actualité IFGU" title="Actualité IFGU"/>
+                                              {% endif %}
+                                        </a>
+                                    </div>
+                                    <div class="actuTxt">
+                                       <h1><a href="{{ item.get_absolute_url }}">{{ item.titre }}</a></h1>
+                                        <p>{{ item.texte|striptags|truncatewords_html:80 }}</p>
+                                        <span><a href="{{ item.get_absolute_url }}">Lire la suite - Publié le {{ item.date_pub }}</a></span>
+                                                       </div>
+                                </div>  
+                  </div>
+            {% endfor %}
+    {% endwith %}
+{% else %}
+    <p>Aucune actualité pour le moment</p>
+{% endif %}
+
+{% paginate %}
+
+{% endblock %}
\ No newline at end of file
index c5a4f80..7fe80d3 100644 (file)
@@ -1,4 +1,4 @@
-{% load cms_tags sekizai_tags %}
+{% load cms_tags sekizai_tags  menu_tags%}
 <!DOCTYPE html>
 <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
 <!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
                <div id="header_content">
                <div id="logo"><img src="{{ STATIC_URL }}img/logo.png"></div>
             <div id="header_droit">
-               <p><a href="#">Accueil</a>-<a href="#">Partenaires</a>-<a href="#">Flux RSS</a>-<a href="#" style="margin-right:0">Plan du site</a></p>
+               <p><a href="{% page_url "accueil" %}">Accueil</a>-<a href="{% page_url "partenaires" %}">Partenaires</a>-<a href="#">Flux RSS</a>-<a href="{% page_url "plan-du-site" %}" style="margin-right:0">Plan du site</a></p>
                 <div id="search">
                         <form action="/recherche/" method="get">
                         <input type="text" class="searchbox" name="s" value="Rechercher..." onFocus="value=''" />
                         <input type="submit" class="searchbox_submit" value="" />
                         </form>
                        </div>
-                <div id="rss"><a href="#"><img src="{{ STATIC_URL }}img/rss.png"></a></div>
+                <div id="rss"><a href="flux/actualite/"><img src="{{ STATIC_URL }}img/rss.png"></a></div>
             </div>
         </div>
         
         <menu id="principal">
                <ul>
-               <li><a href="#">Accueil</a></li>
-                <li><a href="page.html">L’institut</a>
-                       <ul>
-                       <li><a href="#"><span>></span> Vision et mission</a></li>
-                        <li><a href="#"><span>></span> Mission</a></li>
-                        <li><a href="#"><span>></span> Historique</a></li>
-                    </ul>
-                </li>
-                <li><a href="#">Le fonctionnement</a></li>
-                <li><a href="#">Espace Universités</a></li>
-                <li><a href="#">Opportunités</a></li>
-                <li><a href="#">Ressources</a></li>
+                {% show_menu 0 100 100 100 %}
             </ul>
         </menu>        
         
        <h1>Publications</h1>
        <div class="boite">
                 <ul>
-               <li><a href="#">Nos publications</a></li>
-                <li><a href="#">Situation de l’enseignement supérieur en Afrique sub-saharienne</a></li>
-                <li><a href="#">La contribution des conseils d’administration à la gouvernance des universités</a></li>
+               {% show_menu_below_id "publications" %}
              </ul>
         </div>
         
         <h1>Documents de fonds</h1>
        <div class="boite">
                 <ul>
-               <li><a href="#">Décisions et déclarations</a></li>
-                <li><a href="#">Etudes sur la gouvernance universitaire en Afrique</a></li>
-                <li><a href="#">Réflexions sur la modernisation des universités</a></li>
+               {% show_menu_below_id "documents-de-fonds" %}
              </ul>
         </div>
         
-        <h1>Actualités</h1>
-       <div class="boiteActu">
-               <div class="actu">
-               <div class="actuImg"><a href="#"><img src="{{ STATIC_URL }}img/logoActu.png"></a></div>
-                <div class="actuTxt">
-                       <span><a href="#">Le 23 Février 2012</a></span>
-                    <p><a href="#">Atelier Harmonisation du LMD en zone CEMAC et dans la région des Grands Lacs</a></p>
-                </div>
-            </div>
-            <div class="actu">
-               <div class="actuImg"><a href="#"><img src="{{ STATIC_URL }}img/logoActu.png"></a></div>
-                <div class="actuTxt">
-                       <span><a href="#">Le 23 Février 2012</a></span>
-                    <p><a href="#">Atelier Harmonisation du LMD en zone CEMAC</a></p>
-                </div>
-            </div>
-            <div class="actu">
-               <div class="actuImg"><a href="#"><img src="{{ STATIC_URL }}img/logoActu.png"></a></div>
-                <div class="actuTxt">
-                       <span><a href="#">Le 23 Février 2012</a></span>
-                    <p><a href="#">Atelier Harmonisation du LMD en zone CEMAC</a></p>
-                </div>
-            </div>
-            <div class="actu">
-               <div class="actuImg"><a href="#"><img src="{{ STATIC_URL }}img/logoActu.png"></a></div>
-                <div class="actuTxt">
-                       <span><a href="#">Le 23 Février 2012</a></span>
-                    <p><a href="#">Atelier Harmonisation du LMD en zone CEMAC</a></p>
-                </div>
-            </div>
+        <h1><a href="/actualites/">Actualités</a></h1>
+        
+        <div class="boiteActu">
+        {% if actu_list%}
+       
+            {% with actu_list as item_list %}
+                            {% for item in item_list %}
+                               <div class="actu">
+                                       <div class="actuImg">
+                                        <a href="{{ item.get_absolute_url }}">
+                                              {% if item.image %}
+                                              <img src="{{ MEDIA_URL }}{{ item.image }}" width="48" height="50" alt="{{ item.titre }}" title="{{ item.titre }}"/>
+                                              {% else %}
+                                              <img src="{{ STATIC_URL }}img/logoActu.png" width="48" height="50" alt="Actualité IFGU" title="Actualité IFGU"/>
+                                              {% endif %}
+                                        </a>
+                                    </div>
+                                    <div class="actuTxt">
+                                        <span><a href="{{ item.get_absolute_url }}">Le {{ item.date_pub }}</a></span>
+                                        <p><a href="{{ item.get_absolute_url }}">{{ item.titre }}</a></p>
+                                                       </div>
+                                </div>  
+                           {% endfor %}
+             {% endwith %}
+         
+       {% else%}
+              <p>Pas d'actu</p>                
+       {% endif %}
         </div>
         
         <div class="boiteAutre">
         </div>
         
         <div class="boiteAutre2">
-                <p class="faq"><a href="#">Foire aux questions</a></p>
+                <p class="faq"><a href="{% page_url "faq" %}">Foire aux questions</a></p>
         </div>
         
         <div class="boiteAutre2">
-                <p class="ordi"><a href="#">Espace numérique</a></p>
+                <p class="ordi"><a href="{% page_url "espace-numerique" %}">Espace numérique</a></p>
         </div>
         
         <div class="boiteAutre2">
-                <p class="cata"><a href="#">Catalogue des formations</a></p>
+                <p class="cata"><a href="{% page_url "catalogue-des-formations" %}">Catalogue des formations</a></p>
         </div>
     
     </sidebar>
  <footer>
  
        <div id="footer_content">
-               <p><a href="#">Accueil</a><span>-</span><a href="#">Partenaires</a><span>-</span><a href="#">Flux RSS</a><span>-</span><a href="#">Plan du site</a></p>
+               <p><a href="#">Accueil</a><span>-</span><a href="{% page_url "partenaires" %}">Partenaires</a><span>-</span><a href="#">Flux RSS</a><span>-</span><a href="{% page_url "partenaires" %}">Plan du site</a></p>
             <p>© 2010 Institut Panafricain de Gouvernance Universitaire</p>
     </div>
        
diff --git a/project/templates/page.html b/project/templates/page.html
new file mode 100644 (file)
index 0000000..20ad003
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+{% load cms_tags%}
+{% block Contenu %}
+        
+        <div class="text">
+        
+               <h1>{% page_attribute "page_title" %}</h1>
+            
+               {% block Texte %}
+                               {% placeholder Texte %}
+                       {% endblock %}
+        
+        </div>
+        
+{% endblock %}
\ No newline at end of file
diff --git a/project/templates/sitemap.html b/project/templates/sitemap.html
new file mode 100644 (file)
index 0000000..8e11a09
--- /dev/null
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+{% load i18n cms_tags menu_tags%}
+
+{% block Contenu %}
+
+      <h1>Plan du site</h1>
+               <ul id="sitemap">
+            {% with "2" as column %}
+            {% show_menu 0 100 100 100 %}
+            {% endwith %}
+        </ul>
+
+{% endblock %}
index 6f33e92..606a566 100644 (file)
@@ -1,10 +1,11 @@
 # -*- encoding: utf-8 -*
-
-from django.conf.urls.defaults import patterns, include, \
-        handler500, handler404, url
+from django.conf.urls.defaults import *
 from django.conf import settings
 from django.contrib import admin
 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
+from django.contrib.syndication.views import Feed
+from feeds import *
+from cms.sitemaps import CMSSitemap
 
 admin.autodiscover()
 
@@ -18,6 +19,23 @@ urlpatterns = patterns(
     (r'^admin/', include(admin.site.urls)),
 )
 
+#rss Marc
+
+flux = {
+    'actualite': DerniereActualites,
+}
+
+urlpatterns += patterns('',
+(r'^flux/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
+    {'feed_dict': flux}),)
+
+#article
+urlpatterns += patterns('article.views',
+    (r'^actualites/$', 'actualite'),
+    (r'^actualites/(?P<slug>[-\w]+)/$', 'actualite_detail'),
+    (r'^plan-du-site/$', 'plan_du_site'),
+)
+
 if settings.DEBUG:
     urlpatterns += staticfiles_urlpatterns()
     urlpatterns += patterns('',
@@ -29,9 +47,5 @@ if settings.DEBUG:
 # django-cms
 urlpatterns += patterns('',
     url(r'^', include('cms.urls')),
-)
-
-#diaporama
-urlpatterns += patterns('diaporama.views',
-    (r'^$', 'accueil'),
+    url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': {'cmspages': CMSSitemap}}),
 )
\ No newline at end of file
index f2798b7..a3388ca 100644 (file)
@@ -31,3 +31,6 @@ html5lib = 0.95
 
 # Added by Buildout Versions at 2012-09-24 16:06:56.691479
 distribute = 0.6.28
+
+# Added by Buildout Versions at 2012-10-04 14:50:11.877439
+django-pagination = 1.0.7