Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 1 commit
  • 5 files changed
  • 0 comments
  • 1 contributor
Jun 29, 2012
syntax, migrations 9659137
1  .gitignore
@@ -4,6 +4,7 @@
4 4
 *.tmproj
5 5
 *.json
6 6
 @@*
  7
+*.csv
7 8
 
8 9
 # Directories #
9 10
 ###############
22  fcpe/admin.py
@@ -188,11 +188,11 @@ def save_model(self, request, obj, form, change):
188 188
                 if form.cleaned_data['email'] == '':
189 189
                     raise forms.ValidationError("Pour inscrire une personne sur une liste, l'e-mail doit etre valide.")
190 190
                 if liste not in prev :
191  
-                    print "inscription de %s (%s %s) sur %s" % (form.cleaned_data['email'],to_ascii(form.cleaned_data['prenom']), to_ascii(form.cleaned_data['nom']), liste.name)          
192  
-                    liste.subscribe(    form.cleaned_data['email'], 
193  
-                                        to_ascii(form.cleaned_data['prenom']), 
194  
-                                        to_ascii(form.cleaned_data['nom']))    
195  
-        super(PersonneAdmin, self).save_model(request, obj, form, change) 
  191
+                    print "inscription de %s (%s %s) sur %s" % (form.cleaned_data['email'],to_ascii(form.cleaned_data['prenom']), to_ascii(form.cleaned_data['nom']), liste.name)
  192
+                    liste.subscribe(    form.cleaned_data['email'],
  193
+                                        to_ascii(form.cleaned_data['prenom']),
  194
+                                        to_ascii(form.cleaned_data['nom']))
  195
+        super(PersonneAdmin, self).save_model(request, obj, form, change)
196 196
 admin.site.register(Personne,PersonneAdmin)
197 197
 
198 198
 
@@ -214,7 +214,7 @@ class AdherentAdmin(PersonneAdmin,ModelLinkAdminFields, FkAutocompleteAdmin):
214 214
             'classes': ('collapse',),
215 215
             'fields': ('partenaire','organisation', 'role', )
216 216
         }),
217  
-        
  217
+
218 218
     )
219 219
     def save_model(self, request, obj, form, change):
220 220
         #prev = obj.listes.values_list('id',flat=True)
@@ -230,10 +230,10 @@ def save_model(self, request, obj, form, change):
230 230
                 if form.cleaned_data['email'] == '':
231 231
                     raise forms.ValidationError("Pour inscrire une personne sur une liste, l'e-mail doit etre valide.")
232 232
                 if liste not in prev :
233  
-                    print "inscription de %s (%s %s) sur %s" % (form.cleaned_data['email'],to_ascii(form.cleaned_data['prenom']), to_ascii(form.cleaned_data['nom']), liste.name)          
234  
-                    liste.subscribe(    form.cleaned_data['email'], 
235  
-                                        to_ascii(form.cleaned_data['prenom']), 
236  
-                                        to_ascii(form.cleaned_data['nom']))       
  233
+                    print "inscription de %s (%s %s) sur %s" % (form.cleaned_data['email'],to_ascii(form.cleaned_data['prenom']), to_ascii(form.cleaned_data['nom']), liste.name)
  234
+                    liste.subscribe(    form.cleaned_data['email'],
  235
+                                        to_ascii(form.cleaned_data['prenom']),
  236
+                                        to_ascii(form.cleaned_data['nom']))
237 237
         super(AdherentAdmin, self).save_model(request, obj, form, change)
238 238
 admin.site.register(Adherent,AdherentAdmin)
239 239
 
@@ -255,7 +255,7 @@ class EtabAdmin(FkAutocompleteAdmin):
255 255
 class ArticleFCPE(ArticleAdmin):
256 256
     list_filter = ('tags',)
257 257
     fieldsets = (
258  
-        ('Arborescence', {'fields': ('navigation_parent',)}),
  258
+        #('Arborescence', {'fields': ('navigation_parent',)}),
259 259
         ('Contenu', {'fields': ('title', 'content','tags',('publication','template'),'logo')}),
260 260
     )
261 261
 admin.site.unregister(get_article_class())
239  fcpe/migrations/0031_auto__del_field_article_section__add_field_article_category__add_field.py
... ...
@@ -0,0 +1,239 @@
  1
+# encoding: utf-8
  2
+import datetime
  3
+from south.db import db
  4
+from south.v2 import SchemaMigration
  5
+from django.db import models
  6
+
  7
+class Migration(SchemaMigration):
  8
+
  9
+    def forwards(self, orm):
  10
+        
  11
+        # Deleting field 'Article.section'
  12
+        db.delete_column('fcpe_article', 'section_id')
  13
+
  14
+        # Adding field 'Article.category'
  15
+        db.add_column('fcpe_article', 'category', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='fcpe_article_rel', null=True, blank=True, to=orm['coop_cms.ArticleCategory']), keep_default=False)
  16
+
  17
+        # Adding field 'Article.in_newsletter'
  18
+        db.add_column('fcpe_article', 'in_newsletter', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
  19
+
  20
+        # Adding field 'Article.is_homepage'
  21
+        db.add_column('fcpe_article', 'is_homepage', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
  22
+
  23
+        # Adding field 'Article.headline'
  24
+        db.add_column('fcpe_article', 'headline', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
  25
+
  26
+        # Changing field 'Article.title'
  27
+        db.alter_column('fcpe_article', 'title', self.gf('django.db.models.fields.TextField')())
  28
+
  29
+        # Changing field 'Article.content'
  30
+        db.alter_column('fcpe_article', 'content', self.gf('django.db.models.fields.TextField')())
  31
+
  32
+
  33
+    def backwards(self, orm):
  34
+        
  35
+        # Adding field 'Article.section'
  36
+        db.add_column('fcpe_article', 'section', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='fcpe_article_rel', null=True, to=orm['coop_cms.ArticleSection'], blank=True), keep_default=False)
  37
+
  38
+        # Deleting field 'Article.category'
  39
+        db.delete_column('fcpe_article', 'category_id')
  40
+
  41
+        # Deleting field 'Article.in_newsletter'
  42
+        db.delete_column('fcpe_article', 'in_newsletter')
  43
+
  44
+        # Deleting field 'Article.is_homepage'
  45
+        db.delete_column('fcpe_article', 'is_homepage')
  46
+
  47
+        # Deleting field 'Article.headline'
  48
+        db.delete_column('fcpe_article', 'headline')
  49
+
  50
+        # Changing field 'Article.title'
  51
+        db.alter_column('fcpe_article', 'title', self.gf('html_field.db.models.fields.HTMLField')())
  52
+
  53
+        # Changing field 'Article.content'
  54
+        db.alter_column('fcpe_article', 'content', self.gf('html_field.db.models.fields.HTMLField')())
  55
+
  56
+
  57
+    models = {
  58
+        'auth.group': {
  59
+            'Meta': {'object_name': 'Group'},
  60
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  61
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  62
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  63
+        },
  64
+        'auth.permission': {
  65
+            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  66
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  67
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  68
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  69
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  70
+        },
  71
+        'auth.user': {
  72
+            'Meta': {'object_name': 'User'},
  73
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  74
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  75
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  76
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  77
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  78
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  79
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  80
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  81
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  82
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  83
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  84
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  85
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  86
+        },
  87
+        'communes.commune': {
  88
+            'Meta': {'object_name': 'Commune'},
  89
+            'code_postal': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
  90
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  91
+            'insee': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
  92
+            'latitude': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
  93
+            'longitude': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
  94
+            'maj': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  95
+            'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
  96
+        },
  97
+        'contenttypes.contenttype': {
  98
+            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  99
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  100
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  101
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  102
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  103
+        },
  104
+        'coop_cms.articlecategory': {
  105
+            'Meta': {'object_name': 'ArticleCategory'},
  106
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  107
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  108
+            'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  109
+            'slug': ('django_extensions.db.fields.AutoSlugField', [], {'populate_from': "'name'", 'allow_duplicates': 'False', 'max_length': '100', 'separator': "u'-'", 'blank': 'True', 'unique': 'True', 'overwrite': 'False', 'db_index': 'True'})
  110
+        },
  111
+        'django_mailman.list': {
  112
+            'Meta': {'object_name': 'List'},
  113
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
  114
+            'encoding': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
  115
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  116
+            'main_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
  117
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
  118
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  119
+        },
  120
+        'fcpe.adherent': {
  121
+            'Meta': {'object_name': 'Adherent', '_ormbases': ['fcpe.Personne']},
  122
+            '_cl': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  123
+            '_cp': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
  124
+            '_ville': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  125
+            'adhesion_id': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}),
  126
+            'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  127
+            'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  128
+            'annee_scolaire': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.AnneeScolaire']", 'null': 'True', 'blank': 'True'}),
  129
+            'cfoyer': ('django.db.models.fields.CharField', [], {'max_length': '11', 'blank': 'True'}),
  130
+            'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']", 'null': 'True'}),
  131
+            'conseil_local': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['fcpe.ConseilLocal']", 'through': "orm['fcpe.Engagement']", 'symmetrical': 'False'}),
  132
+            'foyer': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'rattachement'", 'null': 'True', 'to': "orm['fcpe.Foyer']"}),
  133
+            'mobile': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  134
+            'personne_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['fcpe.Personne']", 'unique': 'True', 'primary_key': 'True'}),
  135
+            'telephone': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
  136
+        },
  137
+        'fcpe.anneescolaire': {
  138
+            'Meta': {'object_name': 'AnneeScolaire'},
  139
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  140
+            'libelle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
  141
+        },
  142
+        'fcpe.article': {
  143
+            'Meta': {'object_name': 'Article'},
  144
+            'author': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
  145
+            'category': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'fcpe_article_rel'", 'null': 'True', 'blank': 'True', 'to': "orm['coop_cms.ArticleCategory']"}),
  146
+            'content': ('django.db.models.fields.TextField', [], {'default': "u'Page content'", 'blank': 'True'}),
  147
+            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  148
+            'headline': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  149
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  150
+            'in_newsletter': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  151
+            'is_homepage': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  152
+            'logo': ('django.db.models.fields.files.ImageField', [], {'default': "''", 'max_length': '100', 'null': 'True', 'blank': 'True'}),
  153
+            'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  154
+            'publication': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
  155
+            'slug': ('django_extensions.db.fields.AutoSlugField', [], {'populate_from': "'title'", 'allow_duplicates': 'False', 'max_length': '100', 'separator': "u'-'", 'blank': 'True', 'unique': 'True', 'overwrite': 'False', 'db_index': 'True'}),
  156
+            'summary': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
  157
+            'temp_logo': ('django.db.models.fields.files.ImageField', [], {'default': "''", 'max_length': '100', 'null': 'True', 'blank': 'True'}),
  158
+            'template': ('django.db.models.fields.CharField', [], {'default': "'fcpe_article.html'", 'max_length': '200', 'blank': 'True'}),
  159
+            'title': ('django.db.models.fields.TextField', [], {'default': "u'Page title'", 'blank': 'True'})
  160
+        },
  161
+        'fcpe.classe': {
  162
+            'Meta': {'object_name': 'Classe'},
  163
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  164
+            'libelle': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  165
+        },
  166
+        'fcpe.conseillocal': {
  167
+            'Meta': {'object_name': 'ConseilLocal'},
  168
+            '_cp': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
  169
+            '_ville': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  170
+            'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  171
+            'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  172
+            'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '9', 'blank': 'True'}),
  173
+            'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']"}),
  174
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  175
+            'location': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}),
  176
+            'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  177
+            'primaire': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  178
+            'secondaire': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
  179
+        },
  180
+        'fcpe.enfant': {
  181
+            'Meta': {'object_name': 'Enfant'},
  182
+            'cfoyer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'famille'", 'to': "orm['fcpe.Foyer']"}),
  183
+            'classe': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.Classe']"}),
  184
+            'etablissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.Etablissement']"}),
  185
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  186
+            'id_classe_norma': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
  187
+            'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  188
+            'prenom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
  189
+        },
  190
+        'fcpe.engagement': {
  191
+            'Meta': {'ordering': "['role']", 'object_name': 'Engagement'},
  192
+            'adherent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.Adherent']"}),
  193
+            'adhesion_primaire': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  194
+            'conseil_local': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'adhesions'", 'to': "orm['fcpe.ConseilLocal']"}),
  195
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  196
+            'role': ('django.db.models.fields.related.ForeignKey', [], {'default': "'8'", 'to': "orm['fcpe.Role']"})
  197
+        },
  198
+        'fcpe.etablissement': {
  199
+            'Meta': {'object_name': 'Etablissement'},
  200
+            '_cp': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
  201
+            '_ville': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  202
+            'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  203
+            'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  204
+            'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '8', 'blank': 'True'}),
  205
+            'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']", 'null': 'True'}),
  206
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  207
+            'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  208
+            'perimetre': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.ConseilLocal']"})
  209
+        },
  210
+        'fcpe.foyer': {
  211
+            'Meta': {'object_name': 'Foyer'},
  212
+            'adhesion_id': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}),
  213
+            'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  214
+            'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  215
+            'annee_scolaire': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.AnneeScolaire']", 'null': 'True', 'blank': 'True'}),
  216
+            'code_foyer': ('django.db.models.fields.CharField', [], {'max_length': '11', 'blank': 'True'}),
  217
+            'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']", 'null': 'True'}),
  218
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
  219
+        },
  220
+        'fcpe.personne': {
  221
+            'Meta': {'object_name': 'Personne'},
  222
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  223
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  224
+            'listes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['django_mailman.List']", 'null': 'True', 'blank': 'True'}),
  225
+            'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  226
+            'optout': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  227
+            'organisation': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  228
+            'partenaire': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  229
+            'prenom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
  230
+            'role': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
  231
+        },
  232
+        'fcpe.role': {
  233
+            'Meta': {'object_name': 'Role'},
  234
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  235
+            'libelle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
  236
+        }
  237
+    }
  238
+
  239
+    complete_apps = ['fcpe']
24  fcpe/models.py
@@ -29,11 +29,11 @@ class ConseilLocal(geomodels.Model):
29 29
     _ville = models.CharField(blank=True, max_length=100, editable=False)
30 30
     primaire = models.BooleanField(default=False)
31 31
     secondaire = models.BooleanField(default=False)
32  
-    
  32
+
33 33
     location = geomodels.PointField(verbose_name="localisation", blank=True, null=True, srid=4326)
34  
-    
  34
+
35 35
     objects = geomodels.GeoManager()
36  
-    
  36
+
37 37
     def code_postal(self):
38 38
         return self.commune.code_postal
39 39
 
@@ -46,7 +46,7 @@ def __unicode__(self):
46 46
     class Meta:
47 47
         verbose_name = "Conseil Local"
48 48
         verbose_name_plural = "Conseil Locaux"
49  
-    
  49
+
50 50
 
51 51
 class Etablissement(models.Model):
52 52
     nom = models.CharField(blank=True, max_length=100)
@@ -118,13 +118,13 @@ def __unicode__(self):
118 118
         if not self.code_foyer:
119 119
             return u'Foyer %s (code foyer FCPE manquant, à renseigner!)' % self.pk
120 120
         else:
121  
-            return u'Foyer FCPE ' + self.code_foyer    
  121
+            return u'Foyer FCPE ' + self.code_foyer
122 122
 
123 123
     def nb_enfants(self):
124 124
         return self.famille.count()
125 125
 
126 126
     def nom_adherent1(self):
127  
-        return self.rattachement.all()[0]    
  127
+        return self.rattachement.all()[0]
128 128
 
129 129
 
130 130
 class Adherent(Personne):
@@ -201,7 +201,7 @@ class Meta:
201 201
 
202 202
     def __unicode__(self):
203 203
         return self.role.__unicode__() + u' du Conseil local ' + self.conseil_local.__unicode__()
204  
-      
  204
+
205 205
 #from taggit.managers import TaggableManager
206 206
 from taggit_autocomplete_modified.managers import TaggableManagerAutocomplete as TaggableManager
207 207
 from coop_cms.models import BaseArticle
@@ -211,18 +211,18 @@ def __unicode__(self):
211 211
 class Article(BaseArticle):
212 212
     author = models.ForeignKey(User, blank=True, default=None, null=True)
213 213
     #template = models.CharField(_(u'template'), max_length=200, blank=True, default='fcpe_article.html')
214  
-    
  214
+
215 215
     tags = TaggableManager(blank=True)
216  
-    
  216
+
217 217
     def can_publish_article(self, user):
218 218
         return (self.author == user)
219  
-        
  219
+
220 220
     def can_view_article(self, user):
221 221
         if self.publication != BaseArticle.PUBLISHED:
222 222
             return self.can_edit_article(user)
223 223
         else:
224 224
             return True
225  
-        
  225
+
226 226
     #def can_edit_article(self, user):
227 227
     #    return True
228 228
     #
@@ -270,7 +270,7 @@ def __init__(self, f, request, params, model, model_admin,
270 270
         queryset = getattr(f.model, f.name).all()
271 271
         queryset = queryset.annotate(num_times=Count(count_field))
272 272
         queryset = queryset.order_by("-num_times")
273  
-        self.lookup_choices = [(t.pk, "%s (%s)" % (t.name, t.num_times)) 
  273
+        self.lookup_choices = [(t.pk, "%s (%s)" % (t.name, t.num_times))
274 274
                 for t in queryset]
275 275
 
276 276
 
12  templates/fcpe_newsletter.html
... ...
@@ -1,4 +1,4 @@
1  
-{% extends 'coop_cms/newsletter.html' %}
  1
+{% extends "coop_cms/newsletter.html" %}
2 2
 {% load i18n coop_edition coop_bar_tags %}
3 3
 
4 4
 {% block emain_only_style %}
@@ -102,9 +102,9 @@
102 102
 
103 103
 <table border="0" cellpadding="20">
104 104
     <tr><td width="120" valign="top" class="marge">
105  
-        
  105
+
106 106
         <img src="http://www.fcpe63.fr/static/img/logo80.png" alt="logo FCPE"/>
107  
-        
  107
+
108 108
         <p id="news_author">
109 109
         Fédération des Conseils<br/>
110 110
         de Parents d’Elèves<br/>
@@ -120,13 +120,13 @@
120 120
             <a href="mailto:contact@fcpe63.fr">contact@fcpe63.fr</a><br/>
121 121
             <a href="http://www.fcpe63.fr">www.fcpe63.fr</a>
122 122
         </p>
123  
-        
  123
+
124 124
     </td>
125  
-    <td>    
  125
+    <td>
126 126
     {% cms_edit newsletter %}
127 127
         {% block title %}<h2 id="title">{{newsletter.subject|safe}}</h2>{% endblock %}
128 128
         <div id="content">{{ newsletter.content }}</div>
129  
-        
  129
+
130 130
         {% include "coop_cms/_newsletter_articles.html" %}
131 131
     {% end_cms_edit %}
132 132
     </td>

No commit comments for this range

Something went wrong with that request. Please try again.