Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: quinode/fcpe63
base: 7630ffd52d
...
head fork: quinode/fcpe63
compare: 9659137024
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jun 29, 2012
Dominique Guardiola syntax, migrations 9659137
View
1  .gitignore
@@ -4,6 +4,7 @@
*.tmproj
*.json
@@*
+*.csv
# Directories #
###############
View
22 fcpe/admin.py
@@ -188,11 +188,11 @@ def save_model(self, request, obj, form, change):
if form.cleaned_data['email'] == '':
raise forms.ValidationError("Pour inscrire une personne sur une liste, l'e-mail doit etre valide.")
if liste not in prev :
- 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)
- liste.subscribe( form.cleaned_data['email'],
- to_ascii(form.cleaned_data['prenom']),
- to_ascii(form.cleaned_data['nom']))
- super(PersonneAdmin, self).save_model(request, obj, form, change)
+ 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)
+ liste.subscribe( form.cleaned_data['email'],
+ to_ascii(form.cleaned_data['prenom']),
+ to_ascii(form.cleaned_data['nom']))
+ super(PersonneAdmin, self).save_model(request, obj, form, change)
admin.site.register(Personne,PersonneAdmin)
@@ -214,7 +214,7 @@ class AdherentAdmin(PersonneAdmin,ModelLinkAdminFields, FkAutocompleteAdmin):
'classes': ('collapse',),
'fields': ('partenaire','organisation', 'role', )
}),
-
+
)
def save_model(self, request, obj, form, change):
#prev = obj.listes.values_list('id',flat=True)
@@ -230,10 +230,10 @@ def save_model(self, request, obj, form, change):
if form.cleaned_data['email'] == '':
raise forms.ValidationError("Pour inscrire une personne sur une liste, l'e-mail doit etre valide.")
if liste not in prev :
- 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)
- liste.subscribe( form.cleaned_data['email'],
- to_ascii(form.cleaned_data['prenom']),
- to_ascii(form.cleaned_data['nom']))
+ 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)
+ liste.subscribe( form.cleaned_data['email'],
+ to_ascii(form.cleaned_data['prenom']),
+ to_ascii(form.cleaned_data['nom']))
super(AdherentAdmin, self).save_model(request, obj, form, change)
admin.site.register(Adherent,AdherentAdmin)
@@ -255,7 +255,7 @@ class EtabAdmin(FkAutocompleteAdmin):
class ArticleFCPE(ArticleAdmin):
list_filter = ('tags',)
fieldsets = (
- ('Arborescence', {'fields': ('navigation_parent',)}),
+ #('Arborescence', {'fields': ('navigation_parent',)}),
('Contenu', {'fields': ('title', 'content','tags',('publication','template'),'logo')}),
)
admin.site.unregister(get_article_class())
View
239 fcpe/migrations/0031_auto__del_field_article_section__add_field_article_category__add_field.py
@@ -0,0 +1,239 @@
+# encoding: 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):
+
+ # Deleting field 'Article.section'
+ db.delete_column('fcpe_article', 'section_id')
+
+ # Adding field 'Article.category'
+ 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)
+
+ # Adding field 'Article.in_newsletter'
+ db.add_column('fcpe_article', 'in_newsletter', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
+
+ # Adding field 'Article.is_homepage'
+ db.add_column('fcpe_article', 'is_homepage', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
+
+ # Adding field 'Article.headline'
+ db.add_column('fcpe_article', 'headline', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
+
+ # Changing field 'Article.title'
+ db.alter_column('fcpe_article', 'title', self.gf('django.db.models.fields.TextField')())
+
+ # Changing field 'Article.content'
+ db.alter_column('fcpe_article', 'content', self.gf('django.db.models.fields.TextField')())
+
+
+ def backwards(self, orm):
+
+ # Adding field 'Article.section'
+ 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)
+
+ # Deleting field 'Article.category'
+ db.delete_column('fcpe_article', 'category_id')
+
+ # Deleting field 'Article.in_newsletter'
+ db.delete_column('fcpe_article', 'in_newsletter')
+
+ # Deleting field 'Article.is_homepage'
+ db.delete_column('fcpe_article', 'is_homepage')
+
+ # Deleting field 'Article.headline'
+ db.delete_column('fcpe_article', 'headline')
+
+ # Changing field 'Article.title'
+ db.alter_column('fcpe_article', 'title', self.gf('html_field.db.models.fields.HTMLField')())
+
+ # Changing field 'Article.content'
+ db.alter_column('fcpe_article', 'content', self.gf('html_field.db.models.fields.HTMLField')())
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'communes.commune': {
+ 'Meta': {'object_name': 'Commune'},
+ 'code_postal': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'insee': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
+ 'latitude': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
+ 'longitude': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
+ 'maj': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'coop_cms.articlecategory': {
+ 'Meta': {'object_name': 'ArticleCategory'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ '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'})
+ },
+ 'django_mailman.list': {
+ 'Meta': {'object_name': 'List'},
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
+ 'encoding': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'main_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'fcpe.adherent': {
+ 'Meta': {'object_name': 'Adherent', '_ormbases': ['fcpe.Personne']},
+ '_cl': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ '_cp': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
+ '_ville': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'adhesion_id': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'annee_scolaire': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.AnneeScolaire']", 'null': 'True', 'blank': 'True'}),
+ 'cfoyer': ('django.db.models.fields.CharField', [], {'max_length': '11', 'blank': 'True'}),
+ 'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']", 'null': 'True'}),
+ 'conseil_local': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['fcpe.ConseilLocal']", 'through': "orm['fcpe.Engagement']", 'symmetrical': 'False'}),
+ 'foyer': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'rattachement'", 'null': 'True', 'to': "orm['fcpe.Foyer']"}),
+ 'mobile': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'personne_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['fcpe.Personne']", 'unique': 'True', 'primary_key': 'True'}),
+ 'telephone': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ 'fcpe.anneescolaire': {
+ 'Meta': {'object_name': 'AnneeScolaire'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'libelle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ 'fcpe.article': {
+ 'Meta': {'object_name': 'Article'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'fcpe_article_rel'", 'null': 'True', 'blank': 'True', 'to': "orm['coop_cms.ArticleCategory']"}),
+ 'content': ('django.db.models.fields.TextField', [], {'default': "u'Page content'", 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
+ 'headline': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'in_newsletter': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_homepage': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'logo': ('django.db.models.fields.files.ImageField', [], {'default': "''", 'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
+ 'publication': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ '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'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'temp_logo': ('django.db.models.fields.files.ImageField', [], {'default': "''", 'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'template': ('django.db.models.fields.CharField', [], {'default': "'fcpe_article.html'", 'max_length': '200', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.TextField', [], {'default': "u'Page title'", 'blank': 'True'})
+ },
+ 'fcpe.classe': {
+ 'Meta': {'object_name': 'Classe'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'libelle': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'fcpe.conseillocal': {
+ 'Meta': {'object_name': 'ConseilLocal'},
+ '_cp': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
+ '_ville': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '9', 'blank': 'True'}),
+ 'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'location': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}),
+ 'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'primaire': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'secondaire': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ 'fcpe.enfant': {
+ 'Meta': {'object_name': 'Enfant'},
+ 'cfoyer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'famille'", 'to': "orm['fcpe.Foyer']"}),
+ 'classe': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.Classe']"}),
+ 'etablissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.Etablissement']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'id_classe_norma': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'prenom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ 'fcpe.engagement': {
+ 'Meta': {'ordering': "['role']", 'object_name': 'Engagement'},
+ 'adherent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.Adherent']"}),
+ 'adhesion_primaire': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'conseil_local': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'adhesions'", 'to': "orm['fcpe.ConseilLocal']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'role': ('django.db.models.fields.related.ForeignKey', [], {'default': "'8'", 'to': "orm['fcpe.Role']"})
+ },
+ 'fcpe.etablissement': {
+ 'Meta': {'object_name': 'Etablissement'},
+ '_cp': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
+ '_ville': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '8', 'blank': 'True'}),
+ 'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']", 'null': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'perimetre': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.ConseilLocal']"})
+ },
+ 'fcpe.foyer': {
+ 'Meta': {'object_name': 'Foyer'},
+ 'adhesion_id': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'adr1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'adr2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'annee_scolaire': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcpe.AnneeScolaire']", 'null': 'True', 'blank': 'True'}),
+ 'code_foyer': ('django.db.models.fields.CharField', [], {'max_length': '11', 'blank': 'True'}),
+ 'commune': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['communes.Commune']", 'null': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ },
+ 'fcpe.personne': {
+ 'Meta': {'object_name': 'Personne'},
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'listes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['django_mailman.List']", 'null': 'True', 'blank': 'True'}),
+ 'nom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'optout': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'organisation': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'partenaire': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'prenom': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'role': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ 'fcpe.role': {
+ 'Meta': {'object_name': 'Role'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'libelle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['fcpe']
View
24 fcpe/models.py
@@ -29,11 +29,11 @@ class ConseilLocal(geomodels.Model):
_ville = models.CharField(blank=True, max_length=100, editable=False)
primaire = models.BooleanField(default=False)
secondaire = models.BooleanField(default=False)
-
+
location = geomodels.PointField(verbose_name="localisation", blank=True, null=True, srid=4326)
-
+
objects = geomodels.GeoManager()
-
+
def code_postal(self):
return self.commune.code_postal
@@ -46,7 +46,7 @@ def __unicode__(self):
class Meta:
verbose_name = "Conseil Local"
verbose_name_plural = "Conseil Locaux"
-
+
class Etablissement(models.Model):
nom = models.CharField(blank=True, max_length=100)
@@ -118,13 +118,13 @@ def __unicode__(self):
if not self.code_foyer:
return u'Foyer %s (code foyer FCPE manquant, à renseigner!)' % self.pk
else:
- return u'Foyer FCPE ' + self.code_foyer
+ return u'Foyer FCPE ' + self.code_foyer
def nb_enfants(self):
return self.famille.count()
def nom_adherent1(self):
- return self.rattachement.all()[0]
+ return self.rattachement.all()[0]
class Adherent(Personne):
@@ -201,7 +201,7 @@ class Meta:
def __unicode__(self):
return self.role.__unicode__() + u' du Conseil local ' + self.conseil_local.__unicode__()
-
+
#from taggit.managers import TaggableManager
from taggit_autocomplete_modified.managers import TaggableManagerAutocomplete as TaggableManager
from coop_cms.models import BaseArticle
@@ -211,18 +211,18 @@ def __unicode__(self):
class Article(BaseArticle):
author = models.ForeignKey(User, blank=True, default=None, null=True)
#template = models.CharField(_(u'template'), max_length=200, blank=True, default='fcpe_article.html')
-
+
tags = TaggableManager(blank=True)
-
+
def can_publish_article(self, user):
return (self.author == user)
-
+
def can_view_article(self, user):
if self.publication != BaseArticle.PUBLISHED:
return self.can_edit_article(user)
else:
return True
-
+
#def can_edit_article(self, user):
# return True
#
@@ -270,7 +270,7 @@ def __init__(self, f, request, params, model, model_admin,
queryset = getattr(f.model, f.name).all()
queryset = queryset.annotate(num_times=Count(count_field))
queryset = queryset.order_by("-num_times")
- self.lookup_choices = [(t.pk, "%s (%s)" % (t.name, t.num_times))
+ self.lookup_choices = [(t.pk, "%s (%s)" % (t.name, t.num_times))
for t in queryset]
View
12 templates/fcpe_newsletter.html
@@ -1,4 +1,4 @@
-{% extends 'coop_cms/newsletter.html' %}
+{% extends "coop_cms/newsletter.html" %}
{% load i18n coop_edition coop_bar_tags %}
{% block emain_only_style %}
@@ -102,9 +102,9 @@
<table border="0" cellpadding="20">
<tr><td width="120" valign="top" class="marge">
-
+
<img src="http://www.fcpe63.fr/static/img/logo80.png" alt="logo FCPE"/>
-
+
<p id="news_author">
Fédération des Conseils<br/>
de Parents d’Elèves<br/>
@@ -120,13 +120,13 @@
<a href="mailto:contact@fcpe63.fr">contact@fcpe63.fr</a><br/>
<a href="http://www.fcpe63.fr">www.fcpe63.fr</a>
</p>
-
+
</td>
- <td>
+ <td>
{% cms_edit newsletter %}
{% block title %}<h2 id="title">{{newsletter.subject|safe}}</h2>{% endblock %}
<div id="content">{{ newsletter.content }}</div>
-
+
{% include "coop_cms/_newsletter_articles.html" %}
{% end_cms_edit %}
</td>

No commit comments for this range

Something went wrong with that request. Please try again.