remove all code linked to authentic2, add dependency on djangocms-text-ckeditor

This commit is contained in:
Benjamin Dauvergne 2014-03-04 18:10:00 +01:00
parent 83043d8bc0
commit f458ebaa91
143 changed files with 445 additions and 2552 deletions

View File

@ -1,30 +1,30 @@
recursive-include portail_citoyen/apps/login_plugin/templates *.html
recursive-include portail_citoyen/apps/login_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen/apps/login_plugin/locale *.po *.mo
recursive-include portail_citoyen/apps/data_source_plugin/templates *.html
recursive-include portail_citoyen/apps/data_source_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen/apps/data_source_plugin/locale *.po *.mo
recursive-include portail_citoyen/apps/a2_service_list_plugin/templates *.html
recursive-include portail_citoyen/apps/a2_service_list_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen/apps/a2_service_list_plugin/locale *.po *.mo
recursive-include portail_citoyen/apps/passerelle_register_plugin/templates *.html
recursive-include portail_citoyen/apps/passerelle_register_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen/apps/passerelle_register_plugin/locale *.po *.mo
recursive-include portail_citoyen/apps/auquotidien_plugin/templates *.html
recursive-include portail_citoyen/apps/auquotidien_plugin/static *.js
recursive-include portail_citoyen/apps/auquotidien_plugin/locale *.po *.mo
recursive-include portail_citoyen/apps/federation_plugin/templates *.html
recursive-include portail_citoyen/apps/federation_plugin/locale *.po *.mo
recursive-include portail_citoyen/apps/feed_plugin/templates *.html
recursive-include portail_citoyen/apps/feed_plugin/locale *.po *.mo
recursive-include portail_citoyen/apps/msp/templates *.html
recursive-include portail_citoyen/apps/msp/static *.css *.gif *.png *.js *.jpg
recursive-include portail_citoyen/apps/msp/locale *.po *.mo
include portail_citoyen/apps/msp/README.txt
recursive-include portail_citoyen/fixtures *.json
recursive-include portail_citoyen/templates *.html *.txt
recursive-include portail_citoyen/static *.css *.gif *.png *.js
recursive-include portail_citoyen/locale *.po *.mo
recursive-include portail_citoyen2/apps/login_plugin/templates *.html
recursive-include portail_citoyen2/apps/login_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen2/apps/login_plugin/locale *.po *.mo
recursive-include portail_citoyen2/apps/data_source_plugin/templates *.html
recursive-include portail_citoyen2/apps/data_source_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen2/apps/data_source_plugin/locale *.po *.mo
recursive-include portail_citoyen2/apps/a2_service_list_plugin/templates *.html
recursive-include portail_citoyen2/apps/a2_service_list_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen2/apps/a2_service_list_plugin/locale *.po *.mo
recursive-include portail_citoyen2/apps/passerelle_register_plugin/templates *.html
recursive-include portail_citoyen2/apps/passerelle_register_plugin/static *.css *.gif *.png *.js
recursive-include portail_citoyen2/apps/passerelle_register_plugin/locale *.po *.mo
recursive-include portail_citoyen2/apps/auquotidien_plugin/templates *.html
recursive-include portail_citoyen2/apps/auquotidien_plugin/static *.js
recursive-include portail_citoyen2/apps/auquotidien_plugin/locale *.po *.mo
recursive-include portail_citoyen2/apps/federation_plugin/templates *.html
recursive-include portail_citoyen2/apps/federation_plugin/locale *.po *.mo
recursive-include portail_citoyen2/apps/feed_plugin/templates *.html
recursive-include portail_citoyen2/apps/feed_plugin/locale *.po *.mo
recursive-include portail_citoyen2/apps/msp/templates *.html
recursive-include portail_citoyen2/apps/msp/static *.css *.gif *.png *.js *.jpg
recursive-include portail_citoyen2/apps/msp/locale *.po *.mo
include portail_citoyen2/apps/msp/README.txt
recursive-include portail_citoyen2/fixtures *.json
recursive-include portail_citoyen2/templates *.html *.txt
recursive-include portail_citoyen2/static *.css *.gif *.png *.js
recursive-include portail_citoyen2/locale *.po *.mo
recursive-include help *.page
include local_settings.py.example
include requirements.txt

View File

@ -10,4 +10,4 @@ pip install --upgrade -r requirements.txt
./portail-citoyen syncdb --migrate --noinput --no-initial-data
./portail-citoyen loaddata initial_data
./portail-citoyen validate
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc portail_citoyen/ | tee pylint.out) || /bin/true
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc portail_citoyen2/ | tee pylint.out) || /bin/true

View File

@ -3,7 +3,7 @@ import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "portail_citoyen.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "portail_citoyen2.settings")
from django.core.management import execute_from_command_line

BIN
portail-citoyen2.db Normal file

Binary file not shown.

View File

@ -1,58 +0,0 @@
import logging
from django.contrib import admin
from django.contrib.auth.models import Group
from . import models
logger = logging.getLogger(__name__)
from django.contrib.auth.admin import GroupAdmin
# XXX: the UserAdmin must be read-only
class GroupPortailCitoyenAdmin(GroupAdmin):
fieldsets = ((None, {'fields': ('name', 'permissions')}),)
default_fieldsets = ((None, {'fields': ('name', )}),)
def get_fieldsets(self, request, obj=None):
if request.user.is_superuser:
return self.fieldsets
else:
return self.default_fieldsets
admin.site.unregister(Group)
admin.site.register(models.Role, GroupPortailCitoyenAdmin)
from authentic2.compat import get_user_model
from django.db.models.signals import m2m_changed, pre_save
from django.dispatch import receiver
@receiver(pre_save, sender=get_user_model())
def update_is_staff_for_superuser(sender, instance, raw, using, update_fields,
**kwargs):
'''Super-users have always access to the admin site'''
if raw:
return
if instance.is_superuser:
instance.is_staff = True
if hasattr(get_user_model(), 'groups'):
@receiver(m2m_changed, sender=get_user_model().groups.through)
def update_is_staff(sender, instance, action, reverse, model, pk_set,
using, **kwargs):
if not reverse:
if action.startswith('post_'):
instance.is_staff = instance.groups \
.filter(permissions__isnull=False) \
.exists() or instance.is_superuser
instance.save(update_fields=['is_staff'])
else:
for user in get_user_model().objects.filter(pk__in=pk_set):
user.is_staff = user.groups \
.filter(permissions__isnull=False) \
.exists() or user.is_superuser
user.save(update_fields=['is_staff'])

View File

@ -1,177 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding M2M table for field apis on 'AuQuotidienCategoryPlugin'
m2m_table_name = db.shorten_name(u'auquotidien_plugin_auquotidiencategoryplugin_apis')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('auquotidiencategoryplugin', models.ForeignKey(orm[u'auquotidien_plugin.auquotidiencategoryplugin'], null=False)),
('auquotidienapi', models.ForeignKey(orm[u'auquotidien_plugin.auquotidienapi'], null=False))
))
db.create_unique(m2m_table_name, ['auquotidiencategoryplugin_id', 'auquotidienapi_id'])
# Adding M2M table for field apis on 'AuQuotidienActiveFormsPlugin'
m2m_table_name = db.shorten_name(u'auquotidien_plugin_auquotidienactiveformsplugin_apis')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('auquotidienactiveformsplugin', models.ForeignKey(orm[u'auquotidien_plugin.auquotidienactiveformsplugin'], null=False)),
('auquotidienapi', models.ForeignKey(orm[u'auquotidien_plugin.auquotidienapi'], null=False))
))
db.create_unique(m2m_table_name, ['auquotidienactiveformsplugin_id', 'auquotidienapi_id'])
def backwards(self, orm):
# Removing M2M table for field apis on 'AuQuotidienCategoryPlugin'
db.delete_table(db.shorten_name(u'auquotidien_plugin_auquotidiencategoryplugin_apis'))
# Removing M2M table for field apis on 'AuQuotidienActiveFormsPlugin'
db.delete_table(db.shorten_name(u'auquotidien_plugin_auquotidienactiveformsplugin_apis'))
models = {
u'attribute_aggregator.attributeitem': {
'Meta': {'object_name': 'AttributeItem'},
'attribute_name': ('django.db.models.fields.CharField', [], {'default': "('OpenLDAProotDSE', 'OpenLDAProotDSE')", 'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'output_name_format': ('django.db.models.fields.CharField', [], {'default': "('urn:oasis:names:tc:SAML:2.0:attrname-format:uri', 'SAMLv2 URI')", 'max_length': '100'}),
'output_namespace': ('django.db.models.fields.CharField', [], {'default': "('Default', 'Default')", 'max_length': '100'}),
'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['attribute_aggregator.AttributeSource']", 'null': 'True', 'blank': 'True'})
},
u'attribute_aggregator.attributelist': {
'Meta': {'object_name': 'AttributeList'},
'attributes': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'attributes of the list'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['attribute_aggregator.AttributeItem']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
},
u'attribute_aggregator.attributesource': {
'Meta': {'object_name': 'AttributeSource'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
'namespace': ('django.db.models.fields.CharField', [], {'default': "('Default', 'Default')", 'max_length': '100'})
},
u'auquotidien_plugin.auquotidienactiveformsplugin': {
'Meta': {'object_name': 'AuQuotidienActiveFormsPlugin', 'db_table': "u'cmsplugin_auquotidienactiveformsplugin'", '_ormbases': ['cms.CMSPlugin']},
'apis': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auquotidien_plugin.AuQuotidienAPI']", 'symmetrical': 'False'}),
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'})
},
u'auquotidien_plugin.auquotidienapi': {
'Meta': {'ordering': "('order', 'name')", 'object_name': 'AuQuotidienAPI'},
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'allow_redirects': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'hash_algo': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'orig': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'service_provider': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['saml.LibertyServiceProvider']"}),
'signature_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}),
'timeout': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'verify_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
u'auquotidien_plugin.auquotidiencategoryplugin': {
'Meta': {'object_name': 'AuQuotidienCategoryPlugin', 'db_table': "u'cmsplugin_auquotidiencategoryplugin'", '_ormbases': ['cms.CMSPlugin']},
'apis': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auquotidien_plugin.AuQuotidienAPI']", 'symmetrical': 'False'}),
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'})
},
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'idp.attributepolicy': {
'Meta': {'object_name': 'AttributePolicy'},
'allow_attributes_selection': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'ask_consent_attributes': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'attribute_filter_for_sso_from_push_sources': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filter attributes of push sources with list'", 'null': 'True', 'to': u"orm['attribute_aggregator.AttributeList']"}),
'attribute_list_for_sso_from_pull_sources': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attributes from pull sources'", 'null': 'True', 'to': u"orm['attribute_aggregator.AttributeList']"}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'filter_source_of_filtered_attributes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'forward_attributes_from_push_sources': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'map_attributes_from_push_sources': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'map_attributes_of_filtered_attributes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'output_name_format': ('django.db.models.fields.CharField', [], {'default': "('urn:oasis:names:tc:SAML:2.0:attrname-format:uri', 'SAMLv2 URI')", 'max_length': '100'}),
'output_namespace': ('django.db.models.fields.CharField', [], {'default': "('Default', 'Default')", 'max_length': '100'}),
'send_error_and_no_attrs_if_missing_required_attrs': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'source_filter_for_sso_from_push_sources': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'filter attributes of push sources with sources'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['attribute_aggregator.AttributeSource']"})
},
u'saml.libertyprovider': {
'Meta': {'ordering': "('name',)", 'object_name': 'LibertyProvider'},
'ca_cert_chain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'entity_id': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '200'}),
'entity_id_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}),
'federation_source': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'metadata': ('django.db.models.fields.TextField', [], {}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '140', 'blank': 'True'}),
'protocol_conformance': ('django.db.models.fields.IntegerField', [], {'max_length': '10'}),
'public_key': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '140'}),
'ssl_certificate': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
u'saml.libertyproviderpolicy': {
'Meta': {'object_name': 'LibertyProviderPolicy'},
'authn_request_signature_check_hint': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'})
},
u'saml.libertyserviceprovider': {
'Meta': {'object_name': 'LibertyServiceProvider'},
'attribute_policy': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_policy'", 'null': 'True', 'to': u"orm['idp.AttributePolicy']"}),
'enable_following_attribute_policy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'enable_following_sp_options_policy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'liberty_provider': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'service_provider'", 'unique': 'True', 'primary_key': 'True', 'to': u"orm['saml.LibertyProvider']"}),
'policy': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': u"orm['saml.LibertyProviderPolicy']", 'null': 'True'}),
'sp_options_policy': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'sp_options_policy'", 'null': 'True', 'to': u"orm['saml.SPOptionsIdPPolicy']"})
},
u'saml.spoptionsidppolicy': {
'Meta': {'object_name': 'SPOptionsIdPPolicy'},
'accept_slo': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'accepted_name_id_format': ('authentic2.saml.fields.MultiSelectField', [], {'max_length': '1024', 'blank': 'True'}),
'ask_user_consent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'authn_request_signed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'default_name_id_format': ('django.db.models.fields.CharField', [], {'default': "'none'", 'max_length': '256'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'encrypt_assertion': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'encrypt_nameid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'federation_mode': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'forward_slo': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'http_method_for_slo_request': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'idp_initiated_sso': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'iframe_logout_timeout': ('django.db.models.fields.PositiveIntegerField', [], {'default': '300'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'needs_iframe_logout': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'prefered_assertion_consumer_binding': ('django.db.models.fields.CharField', [], {'default': "'meta'", 'max_length': '4'})
}
}
complete_apps = ['auquotidien_plugin']

View File

@ -1,82 +0,0 @@
# -*- 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 field 'DataSource.hash_algo'
db.add_column(u'data_source_plugin_datasource', 'hash_algo',
self.gf('django.db.models.fields.CharField')(default='', max_length=16, blank=True),
keep_default=False)
# Adding field 'DataSource.signature_key'
db.add_column(u'data_source_plugin_datasource', 'signature_key',
self.gf('django.db.models.fields.CharField')(default='', max_length=128, blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'DataSource.hash_algo'
db.delete_column(u'data_source_plugin_datasource', 'hash_algo')
# Deleting field 'DataSource.signature_key'
db.delete_column(u'data_source_plugin_datasource', 'signature_key')
models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 4, 10, 0, 0)'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'data_source_plugin.datasource': {
'Meta': {'ordering': "('name',)", 'object_name': 'DataSource'},
'hash_algo': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mime_type': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'signature_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '1024'})
},
u'data_source_plugin.datasourceplugin': {
'Meta': {'object_name': 'DataSourcePlugin', 'db_table': "u'cmsplugin_datasourceplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
},
u'data_source_plugin.plugindatasource': {
'Meta': {'ordering': "('order', 'id')", 'object_name': 'PluginDataSource'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'plugin': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sources'", 'to': u"orm['data_source_plugin.DataSourcePlugin']"}),
'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plugins'", 'to': u"orm['data_source_plugin.DataSource']"})
},
u'data_source_plugin.rawinlinetemplateplugin': {
'Meta': {'object_name': 'RawInlineTemplatePlugin', 'db_table': "u'cmsplugin_rawinlinetemplateplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
}
}
complete_apps = ['data_source_plugin']

View File

@ -1,75 +0,0 @@
# -*- 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 field 'DataSource.verify_certificate'
db.add_column(u'data_source_plugin_datasource', 'verify_certificate',
self.gf('django.db.models.fields.BooleanField')(default=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'DataSource.verify_certificate'
db.delete_column(u'data_source_plugin_datasource', 'verify_certificate')
models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'data_source_plugin.datasource': {
'Meta': {'ordering': "('name',)", 'object_name': 'DataSource'},
'hash_algo': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mime_type': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'signature_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '1024'}),
'verify_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
u'data_source_plugin.datasourceplugin': {
'Meta': {'object_name': 'DataSourcePlugin', 'db_table': "u'cmsplugin_datasourceplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
},
u'data_source_plugin.plugindatasource': {
'Meta': {'ordering': "('order', 'id')", 'object_name': 'PluginDataSource'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'plugin': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sources'", 'to': u"orm['data_source_plugin.DataSourcePlugin']"}),
'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plugins'", 'to': u"orm['data_source_plugin.DataSource']"})
},
u'data_source_plugin.rawinlinetemplateplugin': {
'Meta': {'object_name': 'RawInlineTemplatePlugin', 'db_table': "u'cmsplugin_rawinlinetemplateplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
}
}
complete_apps = ['data_source_plugin']

View File

@ -1,76 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'DataSource.allow_redirects'
db.add_column(u'data_source_plugin_datasource', 'allow_redirects',
self.gf('django.db.models.fields.BooleanField')(default=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'DataSource.allow_redirects'
db.delete_column(u'data_source_plugin_datasource', 'allow_redirects')
models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'data_source_plugin.datasource': {
'Meta': {'ordering': "('name',)", 'object_name': 'DataSource'},
'allow_redirects': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'hash_algo': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mime_type': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'signature_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '1024'}),
'verify_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
u'data_source_plugin.datasourceplugin': {
'Meta': {'object_name': 'DataSourcePlugin', 'db_table': "u'cmsplugin_datasourceplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
},
u'data_source_plugin.plugindatasource': {
'Meta': {'ordering': "('order', 'id')", 'object_name': 'PluginDataSource'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'plugin': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sources'", 'to': u"orm['data_source_plugin.DataSourcePlugin']"}),
'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plugins'", 'to': u"orm['data_source_plugin.DataSource']"})
},
u'data_source_plugin.rawinlinetemplateplugin': {
'Meta': {'object_name': 'RawInlineTemplatePlugin', 'db_table': "u'cmsplugin_rawinlinetemplateplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
}
}
complete_apps = ['data_source_plugin']

View File

@ -1,77 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'DataSource.timeout'
db.add_column(u'data_source_plugin_datasource', 'timeout',
self.gf('django.db.models.fields.IntegerField')(default=10),
keep_default=False)
def backwards(self, orm):
# Deleting field 'DataSource.timeout'
db.delete_column(u'data_source_plugin_datasource', 'timeout')
models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'data_source_plugin.datasource': {
'Meta': {'ordering': "('name',)", 'object_name': 'DataSource'},
'allow_redirects': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'hash_algo': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mime_type': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'signature_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}),
'timeout': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '1024'}),
'verify_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
u'data_source_plugin.datasourceplugin': {
'Meta': {'object_name': 'DataSourcePlugin', 'db_table': "u'cmsplugin_datasourceplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
},
u'data_source_plugin.plugindatasource': {
'Meta': {'ordering': "('order', 'id')", 'object_name': 'PluginDataSource'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'plugin': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sources'", 'to': u"orm['data_source_plugin.DataSourcePlugin']"}),
'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plugins'", 'to': u"orm['data_source_plugin.DataSource']"})
},
u'data_source_plugin.rawinlinetemplateplugin': {
'Meta': {'object_name': 'RawInlineTemplatePlugin', 'db_table': "u'cmsplugin_rawinlinetemplateplugin'"},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
}
}
complete_apps = ['data_source_plugin']

View File

@ -1,113 +0,0 @@
# -*- 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 field 'Feed.css_classes'
db.add_column(u'feed_plugin_feed', 'css_classes',
self.gf('django.db.models.fields.CharField')(default='', max_length=128),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Feed.css_classes'
db.delete_column(u'feed_plugin_feed', 'css_classes')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'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'}),
u'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'})
},
u'feed_plugin.feed': {
'Meta': {'object_name': 'Feed'},
'css_classes': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
},
u'feed_plugin.feedpreference': {
'Meta': {'object_name': 'FeedPreference'},
'feed': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['feed_plugin.Feed']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['portail_citoyen.Citoyen']"})
},
u'feed_plugin.selectuserfeed': {
'Meta': {'object_name': 'SelectUserFeed', 'db_table': "u'cmsplugin_selectuserfeed'", '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'})
},
u'feed_plugin.showuserfeed': {
'Meta': {'object_name': 'ShowUserFeed', 'db_table': "u'cmsplugin_showuserfeed'", '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {'default': '10'}),
'timeout': ('django.db.models.fields.PositiveIntegerField', [], {'default': '60'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
}
}
complete_apps = ['feed_plugin']

View File

@ -1,121 +0,0 @@
# -*- 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):
# Deleting field 'Feed.css_classes'
db.delete_column(u'feed_plugin_feed', 'css_classes')
# Adding field 'Feed.color_hex'
db.add_column(u'feed_plugin_feed', 'color_hex',
self.gf('django.db.models.fields.CharField')(default='', max_length=6),
keep_default=False)
def backwards(self, orm):
# Adding field 'Feed.css_classes'
db.add_column(u'feed_plugin_feed', 'css_classes',
self.gf('django.db.models.fields.CharField')(default='', max_length=128),
keep_default=False)
# Deleting field 'Feed.color_hex'
db.delete_column(u'feed_plugin_feed', 'color_hex')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'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'}),
u'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'})
},
u'feed_plugin.feed': {
'Meta': {'object_name': 'Feed'},
'color_hex': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '6'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
},
u'feed_plugin.feedpreference': {
'Meta': {'object_name': 'FeedPreference'},
'feed': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['feed_plugin.Feed']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['portail_citoyen.Citoyen']"})
},
u'feed_plugin.selectuserfeed': {
'Meta': {'object_name': 'SelectUserFeed', 'db_table': "u'cmsplugin_selectuserfeed'", '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'})
},
u'feed_plugin.showuserfeed': {
'Meta': {'object_name': 'ShowUserFeed', 'db_table': "u'cmsplugin_showuserfeed'", '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {'default': '10'}),
'timeout': ('django.db.models.fields.PositiveIntegerField', [], {'default': '60'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
}
}
complete_apps = ['feed_plugin']

View File

@ -1,114 +0,0 @@
# -*- 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 field 'Feed.css_classes'
db.add_column(u'feed_plugin_feed', 'css_classes',
self.gf('django.db.models.fields.CharField')(default='', max_length=128),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Feed.css_classes'
db.delete_column(u'feed_plugin_feed', 'css_classes')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'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'}),
u'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'})
},
u'feed_plugin.feed': {
'Meta': {'object_name': 'Feed'},
'color_hex': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '6'}),
'css_classes': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
},
u'feed_plugin.feedpreference': {
'Meta': {'object_name': 'FeedPreference'},
'feed': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['feed_plugin.Feed']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['portail_citoyen.Citoyen']"})
},
u'feed_plugin.selectuserfeed': {
'Meta': {'object_name': 'SelectUserFeed', 'db_table': "u'cmsplugin_selectuserfeed'", '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'})
},
u'feed_plugin.showuserfeed': {
'Meta': {'object_name': 'ShowUserFeed', 'db_table': "u'cmsplugin_showuserfeed'", '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {'default': '10'}),
'timeout': ('django.db.models.fields.PositiveIntegerField', [], {'default': '60'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
}
}
complete_apps = ['feed_plugin']

View File

@ -1,29 +0,0 @@
from django import forms
from django.contrib.auth.forms import UserChangeForm as AuthUserChangeForm, UserCreationForm as AuthUserCreationForm
from django.contrib.auth import get_user_model
from authentic2.forms import UserProfileForm
class UserChangeForm(AuthUserChangeForm):
class Meta(AuthUserChangeForm.Meta):
model = get_user_model()
class UserCreationForm(AuthUserCreationForm):
class Meta(AuthUserCreationForm.Meta):
model = get_user_model()
def clean_username(self):
# Since User.username is unique, this check is redundant,
# but it sets a nicer error message than the ORM. See #13147.
username = self.cleaned_data["username"]
User = get_user_model()
try:
User._default_manager.get(username=username)
except User.DoesNotExist:
return username
raise forms.ValidationError(self.error_messages['duplicate_username'])
class ProfileFormPluginForm(UserProfileForm):
pass

View File

@ -1,164 +0,0 @@
import random
import string
import locale
from optparse import make_option
import os.path
import logging
import csv
import operator
import collections
try:
from django.contrib.auth import get_user_model
except ImportError:
from django.contrib.auth.models import User
get_user_model = lambda: User
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from authentic2.saml.models import LibertyServiceProvider, LibertyFederation
from authentic2.hashers import Drupal7PasswordHasher
logger = logging.getLogger()
class FakeException(Exception):
pass
class Command(BaseCommand):
INPUT_FIELD_NAMES = (
'uid', 'username', 'password', 'email', 'firstname', 'name_id'
)
OUTPUT_FIELD_NAMES = (
'uid', 'username', 'name_id',
)
args = 'input.csv output.csv'
help = '''Load Drupal users
The input file must have the following columns:
''' + ', '.join(INPUT_FIELD_NAMES) + '\n'
option_list = BaseCommand.option_list + (
make_option('--provider', action="store"),
make_option('--list-providers', action="store_true"),
make_option('--verbose', action="store_true"),
make_option('--fake', action="store_true"),
make_option('--debug', action="store_true"),
)
def handle(self, *args, **options):
locale.setlocale(locale.LC_ALL, '')
if options['verbose'] or options['debug']:
handler = logging.StreamHandler()
handler.setLevel(level=logging.DEBUG if options['debug'] else logging.INFO)
logger.addHandler(handler)
if options['list_providers']:
print 'Providers:'
for p in LibertyServiceProvider.objects.all():
print '-', p.liberty_provider.slug
return
try:
self.load_drupal_users(args[0], args[1], options)
except FakeException:
pass
def generate_name_id(self):
# example: _9903A47299512211F49F9E7931183761
alpha = string.ascii_uppercase + string.digits
name_id = ''.join(random.choice(alpha) for i in xrange(32))
return '_%s' % name_id
@transaction.commit_on_success
def load_drupal_users(self, input_csv, output_csv, options):
infile = file(input_csv)
outfile = file(output_csv, 'w')
csv_in = csv.DictReader(infile, fieldnames=self.INPUT_FIELD_NAMES)
# skip header line
csv_in.next()
rows = list(csv_in)
csv_out = csv.DictWriter(outfile, fieldnames=self.OUTPUT_FIELD_NAMES)
# writer header line to output file
csv_out.writerow(dict(zip(self.OUTPUT_FIELD_NAMES,
self.OUTPUT_FIELD_NAMES)))
new_users = []
if not options['provider']:
raise CommandError('--provider option is required')
try:
provider = LibertyServiceProvider.objects.get(liberty_provider__slug=options['provider'])
except LibertyProvider.DoesNotExist:
raise CommandError('service provider %s does not exist' % options['provider'])
User = get_user_model()
hasher = Drupal7PasswordHasher()
created_account = 0
logger.info('loading drupal accounts from %r', input_csv)
errors = False
def filter_null(row):
for key, cell in row.iteritems():
if cell == 'NULL':
yield key, ''
else:
yield key, cell
for row in rows:
row = dict(filter_null(row))
uid = row['uid']
username = row['username']
password = row['password']
email = row['email']
firstname = row['firstname'].decode('utf-8')[:30]
name_id = row['name_id']
if name_id:
try:
fed = LibertyFederation.objects.get(
user__isnull=False,
sp=provider,
name_id_format='urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
name_id_content=name_id)
logger.debug('user %r already linked with name_id %r',
username, name_id)
continue
except LibertyFederation.DoesNotExist:
if User.objects.filter(username=username).exists():
errors = True
logger.warning('user %r exist but not with name_id %r, '
'aborting, check manually', username, name_id)
continue
else:
name_id = self.generate_name_id()
new_users.append({
'uid': uid,
'username': username,
'name_id': name_id
})
try:
User.objects.get(username=username)
errors = True
logger.warning('username %r already exists but does not have '
'a name_id, please check manually.' % username)
continue
except User.DoesNotExist:
pass
user = User.objects.create(
username=username,
email=email,
first_name=firstname,
password=hasher.from_drupal(password)
)
LibertyFederation.objects.create(
user=user,
sp=provider,
name_id_format='urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
name_id_content=name_id
)
logger.info('created account %r with name_id %r', username, name_id)
created_account += 1
if errors:
raise CommandError('Too much errors, see logs.')
if options['fake']:
logger.info('fake run')
raise FakeException()
else:
csv_out.writerows(new_users)
outfile.close()
logger.info('created %d accounts' % created_account)

View File

@ -1,81 +0,0 @@
import random
import string
import locale
from optparse import make_option
import os.path
import logging
import urlparse
import re
try:
from django.contrib.auth import get_user_model
except ImportError:
from django.contrib.auth.models import User
get_user_model = lambda: User
from django.core.management.base import BaseCommand, CommandError, NoArgsCommand
from django.db import transaction
from django.utils.http import urlencode
from django.contrib.auth.models import Group
from authentic2.saml.models import LibertyProvider, LibertyFederation
from data_source_plugin.signature import sign_url
import requests
logger = logging.getLogger()
class Command(BaseCommand):
args = '<wcs_data_path wcs_data_path ...>'
help = '''Load W.C.S. roles'''
option_list = BaseCommand.option_list + (
make_option('--url', action="store"),
make_option('--prefix', action="store", default='AuQuo::'),
make_option('--orig', action="store"),
make_option('--key', action="store"),
make_option('--email', action="store"),
make_option('--delete-orphaned-roles', action="store_true",
default=False),
make_option('--debug', action="store_true"),
make_option('--verbose', action="store_true"),
)
@transaction.commit_on_success
def handle(self, *args, **options):
locale.setlocale(locale.LC_ALL, '')
if options['verbose'] or options['debug']:
handler = logging.StreamHandler()
handler.setLevel(level=logging.DEBUG if options['debug'] else logging.INFO)
logger.addHandler(handler)
for key in ('url', 'prefix', 'orig', 'key', 'email'):
if not options.get(key):
raise CommandError('the --%s option must be provided' % key)
url = urlparse.urljoin(options['url'], '/roles')
url += '?' + urlencode({ 'format': 'json', 'orig': options['orig'], 'email': options['email']})
logger.debug('signing using key %r', options['key'])
url = sign_url(url, options['key'])
logger.debug('sending GET to %s', url)
response = requests.get(url)
logger.debug('got response %r', response.content)
json_response = response.json()
if json_response.get('err') == 1:
raise CommandError('Web Service error: %s' % json_response['err_class'])
prefix = options['prefix'].decode('utf-8')
if not prefix:
raise CommandError('the prefix %s is invalid' % options['prefix'])
# clean ending
prefix = re.sub(':+$', '', prefix)
default_groups = [{'text': 'Admin'},{'text': 'BackOffice'}]
all_groups = set()
for role in json_response.get('data', [])+default_groups:
role_name = role['text']
group_name = u'{0}::{1}'.format(prefix, role_name)
group, created = Group.objects.get_or_create(name=group_name)
all_groups.add(group.id)
if created:
logger.info('created role %s', group.name)
if options['delete_orphaned_roles']:
for group in Group.objects.exclude(id__in=all_groups) \
.filter(name__startswith=prefix+'::'):
logger.info('deleted orphaned role %s', group.name)
group.delete()

View File

@ -1,169 +0,0 @@
import random
import string
import locale
from optparse import make_option
import os.path
import logging
try:
from django.contrib.auth import get_user_model
except ImportError:
from django.contrib.auth.models import User
get_user_model = lambda: User
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from authentic2.saml.models import LibertyProvider, LibertyFederation
import wcs
import publisher
import ConfigParser
from qommon.ident.password_accounts import PasswordAccount
from wcs.users import User as WcsUser
from wcs.formdata import get_dict_with_varnames
import lasso
logger = logging.getLogger()
class Command(BaseCommand):
args = '<wcs_data_path wcs_data_path ...>'
help = '''Load W.C.S. users'''
option_list = BaseCommand.option_list + (
make_option('--provider', action="store"),
make_option("--extra", action="append", default=[]),
make_option('--verbose', action="store_true"),
make_option('--fake', action="store_true"),
make_option('--debug', action="store_true"),
make_option('--allow-not-mapped', action="store_true"),
make_option('--help-mapping', action="store_true"),
make_option('--mapping', action="append", default=[]),
)
hashing_algo_mapping = {
'sha': 'sha1',
}
@transaction.commit_on_success
def handle(self, *args, **options):
locale.setlocale(locale.LC_ALL, '')
if options['verbose'] or options['debug']:
handler = logging.StreamHandler()
handler.setLevel(level=logging.DEBUG if options['debug'] else logging.INFO)
logger.addHandler(handler)
options['mapping'] = map(lambda s: s.split(':'), options['mapping'])
for wcs_data_path in args:
if not os.path.isdir(wcs_data_path):
raise CommandError('path %s does not exist', wcs_data_path)
self.handle_path(wcs_data_path, options)
def generate_name_id(self):
# example: _9903A47299512211F49F9E7931183761
alpha = string.ascii_uppercase + string.digits
name_id = ''.join(random.choice(alpha) for i in xrange(32))
return '_%s' % name_id
def handle_path(self, path, options):
logger.debug('==> %s' % path)
User = get_user_model()
publisher.WcsPublisher.configure(ConfigParser.RawConfigParser())
for extra in options['extra']:
publisher.WcsPublisher.register_extra_dir(extra)
pub = publisher.WcsPublisher.create_publisher()
pub.app_dir = path
pub.set_config()
formdef = WcsUser.get_formdef()
wcs_user_fields = get_dict_with_varnames(formdef.fields, {}).keys()
user_fields = User._meta.get_all_field_names()
if options.get('help_mapping', False):
print 'List of W.C.S. user fields:'
for wcs_user_field in wcs_user_fields:
print '-', wcs_user_field
print 'List of portail-citoyen user fields:'
for user_field in user_fields:
print '-', user_field
return
for wcs_user_field, user_field in options.get('mapping', []):
if wcs_user_field not in wcs_user_fields:
raise CommandError('wcs user field %r unknown' % wcs_user_field)
if user_field not in user_fields:
raise CommandError('idp user field %r unknown' % user_field)
not_mapped = False
mapping_dict = dict(options.get('mapping', ()))
for wcs_user_field in wcs_user_fields:
if wcs_user_field not in mapping_dict:
print 'W.C.S. user field %r not mapped' % wcs_user_field
not_mapped = True
if not_mapped and not options['allow_not_mapped']:
raise CommandError('Some W.C.S. user fields are not mapped ! Aborting.')
try:
provider = LibertyProvider.objects.get(name=options['provider'])
except LibertyProvider.DoesNotExist:
raise CommandError('provider %s does not exist' % options['provider'])
to_store = []
for password_account in PasswordAccount.values():
new_user = None
new_federation = None
wcs_user = password_account.get_user()
if not wcs_user:
logger.info('no wcs user for password account %s' % password_account)
continue
try:
new_federation = LibertyFederation.objects.get(
sp_id=provider.entity_id,
name_id_content__in=getattr(wcs_user, 'name_identifiers', []) or [])
new_user = new_federation.user
logger.info('wcs account %r already linked to idp account %r, updating' % (password_account.id, new_federation.user.username))
except LibertyFederation.DoesNotExist:
pass
if User.objects.filter(username=password_account.id).exists():
if options['verbose']:
logger.info('wcs account %r cannot be linked as homonym account %r:%s exists' % (password_account.id,
federation.user.username, federation.user.id))
continue
algo = password_account.hashing_algo
algo = self.hashing_algo_mapping.get(algo, algo)
if algo:
new_password = '%s$$%s' % (algo, password_account.password)
if not new_user:
if User.objects.filter(username=password_account.id).exists():
logger.info('wcs account %r already exists in db' % (password_account.id,))
continue
new_user = User(username=password_account.id)
wcs_user_data = get_dict_with_varnames(formdef.fields, wcs_user.form_data)
for wcs_user_field, user_field in options['mapping']:
value = wcs_user_data.get(wcs_user_field)
if not value:
continue
logger.info('setting %s to %s' % (user_field, value))
setattr(new_user, user_field, str(value).decode('utf-8'))
if algo:
new_user.password = new_password
else:
new_user.set_password(password_account.password)
new_user.save()
name_id = self.generate_name_id()
if not new_federation:
new_federation = LibertyFederation.objects.create(user=new_user,
sp_id=provider.entity_id,
idp_id='',
name_id_qualifier=name_id,
name_id_sp_name_qualifier=provider.entity_id,
name_id_format=lasso.SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT,
name_id_content=name_id,
name_id_sp_provided_id='')
wcs_user.name_identifiers.append(name_id)
logger.info('created new link %s %s' % (password_account.id, wcs_user.name_identifiers))
to_store.append(wcs_user)
if options['fake']:
raise CommandError('Fake...')
for user in to_store:
user.store()

View File

@ -1,109 +0,0 @@
# -*- 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 'Citoyen'
db.create_table(u'portail_citoyen_citoyen', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('password', self.gf('django.db.models.fields.CharField')(max_length=128)),
('last_login', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('is_superuser', self.gf('django.db.models.fields.BooleanField')(default=False)),
('username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=256)),
('is_staff', self.gf('django.db.models.fields.BooleanField')(default=False)),
('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)),
('date_joined', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
('backend', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)),
('backend_id', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
('title', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)),
('first_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)),
('last_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)),
('email', self.gf('django.db.models.fields.EmailField')(max_length=128, blank=True)),
('city', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)),
('address', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
('postal_code', self.gf('django.db.models.fields.CharField')(max_length=5, blank=True)),
('phone', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)),
('mobile', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)),
))
db.send_create_signal(u'portail_citoyen', ['Citoyen'])
# Adding M2M table for field groups on 'Citoyen'
m2m_table_name = db.shorten_name(u'portail_citoyen_citoyen_groups')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('citoyen', models.ForeignKey(orm[u'portail_citoyen.citoyen'], null=False)),
('group', models.ForeignKey(orm[u'auth.group'], null=False))
))
db.create_unique(m2m_table_name, ['citoyen_id', 'group_id'])
# Adding M2M table for field user_permissions on 'Citoyen'
m2m_table_name = db.shorten_name(u'portail_citoyen_citoyen_user_permissions')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('citoyen', models.ForeignKey(orm[u'portail_citoyen.citoyen'], null=False)),
('permission', models.ForeignKey(orm[u'auth.permission'], null=False))
))
db.create_unique(m2m_table_name, ['citoyen_id', 'permission_id'])
def backwards(self, orm):
# Deleting model 'Citoyen'
db.delete_table(u'portail_citoyen_citoyen')
# Removing M2M table for field groups on 'Citoyen'
db.delete_table(db.shorten_name(u'portail_citoyen_citoyen_groups'))
# Removing M2M table for field user_permissions on 'Citoyen'
db.delete_table(db.shorten_name(u'portail_citoyen_citoyen_user_permissions'))
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'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'}),
u'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'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'company': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'nickname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'postal_address': ('django.db.models.fields.TextField', [], {'max_length': '255', 'blank': 'True'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
}
}
complete_apps = ['portail_citoyen']

View File

@ -1,63 +0,0 @@
# -*- 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):
pass
def backwards(self, orm):
pass
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'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'}),
u'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'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
}
}
complete_apps = ['portail_citoyen']

View File

@ -1,63 +0,0 @@
# -*- 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):
db.send_create_signal('portail_citoyen', [ 'Role' ])
def backwards(self, orm):
pass
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'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'}),
u'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'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
}
}
complete_apps = ['portail_citoyen']

View File

@ -1,95 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'ProfileFormPlugin'
db.create_table(u'cmsplugin_profileformplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
))
db.send_create_signal(u'portail_citoyen', ['ProfileFormPlugin'])
def backwards(self, orm):
# Deleting model 'ProfileFormPlugin'
db.delete_table(u'cmsplugin_profileformplugin')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'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'}),
u'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'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
},
u'portail_citoyen.profileformplugin': {
'Meta': {'object_name': 'ProfileFormPlugin', 'db_table': "u'cmsplugin_profileformplugin'", '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'})
}
}
complete_apps = ['portail_citoyen']

View File

@ -1,70 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'ProfileFormPlugin'
db.delete_table(u'cmsplugin_profileformplugin')
def backwards(self, orm):
# Adding model 'ProfileFormPlugin'
db.create_table(u'cmsplugin_profileformplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
))
db.send_create_signal(u'portail_citoyen', ['ProfileFormPlugin'])
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'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'}),
u'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'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
}
}
complete_apps = ['portail_citoyen']

View File

@ -1,10 +0,0 @@
from django.contrib.auth.models import Group
class Role(Group):
class Meta:
proxy = True
verbose_name = _('role')
verbose_name_plural = _('roles')
import permission_hack

View File

@ -1,10 +0,0 @@
{% extends "admin/base.html" %}
{% load i18n %}
{% block title %}{{ title }} | Administration du portail citoyen{% endblock %}
{% block branding %}
<h1 id="site-name">Administration du portail citoyen</h1>
{% endblock %}
{% block nav-global %}{% endblock %}

View File

@ -1,93 +0,0 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load sekizai_tags %}
{% block bodyargs %}
class="narrow-page"
{% endblock %}
{% block messages %}
{% endblock %}
{% block menu %}
{% endblock %}
{% block content %}
<h2 id="welcome-title">Bienvenue sur votre Portail Citoyen</h2>
<div id="welcome">
<h3>Un site Internet pour et par lusager</h3>
<p>
Innovants, nous lançons un site inédit, personnalisable à
volonté, pour que chaque internaute puisse créer sa propre version en fonction
de ses centres dintérêts et de ses envies !
</p>
<p>
E-services accessibles 24h/24 et 7jrs/7 en un clic, navigation qui sadapte à
linternaute… avec la nouvelle version de son site lancée en septembre 2012,
vous avez accès à un graphisme épuré pour plus de confort de lecture, des
présentations ludiques et interactives, des photos, des vidéos… et une mine
dinformations à découvrir au fil de votre parcours ou de vos recherches.
<p>
<h3>Une offre de services performante</h3>
<p>
Contacter une piscine ou le service des déchets ? Réaliser une modification de
votre abonnement à la téléalarme ? Effectuer une demande de raccordement au
réseau d'assainissement ? Répondre à une offre d'emploi ou déposer une
candidature spontanée ?
</p>
<p>
La plate-forme de services dématérialisés évolue et vous permet d'accomplir la
plupart de vos démarches en ligne, 24h/24 et 7j/7, de suivre le traitement de
vos demandes de « e-services ».
</p>
<p>
Pour cela il vous suffit de vous connecter avec votre compte citoyen
pour accéder au portail et à ses « e-services ».
</p>
<p>
Si vous ne disposez pas encore de compte citoyen ?
N'hésitez plus et inscrivez-vous dès maintenant, votre compte vous donnera
également accès à votre compte lecteur du réseau des Médiathèque, à votre
compte famille à l'Ecolothèque ou le compte élève au Conservatoire, et enfin
d'accéder directement à vos espaces personnalisés, sans avoir à re-saisir vos
identifiants et mots de passe.
</p>
</div>
{% if messages %}
<div id="messages" class="messages-login">
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="right">
{% for name, content in methods %}
{{ content|safe }}
{% endfor %}
</div>
{% if MSP %}
{% with tpl='msp/connecting.html' %}
{% include tpl with popup=1 %}
{% endwith %}
{% endif %}
<br class="clear"/>
{% endblock %}

View File

@ -1,16 +0,0 @@
{% load i18n %}
<div>
<form method="post" action="">
{% csrf_token %}
{% include "portail_citoyen/form_fields.html" with form=form %}
<input type="submit" name="{{ submit_name }}" value="{% trans "Log in" %}"/>
{% if cancel %}
<input type="submit" name="cancel" value="{% trans 'Cancel' %}"/>
{% endif %}
</form>
</div>
<div class="login-actions">
<p>→ {% trans "Forgot password?" %} <a href="{% url 'auth_password_reset' %}">{% trans "Reset it!" %}</a></p>
<p>→ {% trans "Not a member?" %} <a href="{% url 'registration_register' %}">{% trans "Register!" %}</a></p>
</div>

View File

@ -1,22 +0,0 @@
{% extends "base.html" %}
{% load i18n %}
{% load menu_tags cms_tags sekizai_tags %}
{% block breadcrumbs %}
<li class="last">{% page_attribute "page_title" %}</li>
{% endblock %}
{% block content %}
<div id="real-content">
{% placeholder "content" %}
</div>
{% endblock %}
{% block sidebar %}
{% placeholder "sidebar-top" inherit %}
{% placeholder "sidebar" %}
{% endblock %}
{% block footer %}
{% placeholder "footer" inherit or %}{% show_uncached_placeholder "footer" "extra-placeholders" %}{% endplaceholder %}
{% endblock %}

View File

@ -1,34 +0,0 @@
{% extends "base.html" %}
{% load i18n %}
{% load menu_tags cms_tags sekizai_tags %}
{% block content %}
<h1>Textes supplémentaires pour les pages «systèmes»</h1>
<h2>Connexion</h2>
{% placeholder "login" %}
{% placeholder "login-sidebar" %}
{% placeholder "logout" %}
<h2>Gestion mot de passe</h2>
{% placeholder "password_change_form" %}
{% placeholder "password_reset_complete" %}
{% placeholder "password_reset_confirm" %}
{% placeholder "password_reset_done" %}
{% placeholder "password_reset_form" %}
<h2>Création d'un compte</h2>
{% placeholder "registration_form" %}
{% placeholder "registration_complete" %}
{% placeholder "activation_complete" %}
<h2>Modification d'un compte</h2>
{% placeholder "edit_profile" %}
{% placeholder "email_change" %}
{% endblock %}
{% block footer %}
{% placeholder "footer" %}
{% endblock %}

View File

@ -1,17 +0,0 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Email change" %}{% endblock %}
{% block content %}
<div id="real-content">
<div class="block">
<p>{% blocktrans with email=user.email %}Your current email is {{ email }}{% endblocktrans %}</p>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans "Validate" %}"/>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,10 +0,0 @@
{% extends "registration/base.html" %}
{% load i18n %}
{% block content %}
<p>
{% trans "Your account is now activated" %}
</p>
<p><a href="/">{% trans "Back" %}<a/></p>
{% endblock %}

View File

@ -1,16 +0,0 @@
Bonjour,
Vous avez demandé à ouvrir un compte citoyen sur le portail de
démonstration.
Votre identifiant daccès est : {{ user.username }}
Pour confirmer la création et activer votre compte, cliquez sur le lien
suivant :
http://{{ site.domain }}{% url 'registration_activate' activation_key %}
Ce lien est valable pendant {{ expiration_days }} jours.
--
Important : Cet email est généré par un automate, merci de ne pas y répondre.

View File

@ -1 +0,0 @@
Activation de votre compte citoyen

View File

@ -1,7 +0,0 @@
{% extends "base.html" %}
{% block messages %}
{% endblock %}
{% block menu %}
{% endblock %}

View File

@ -1,20 +0,0 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}
{% trans "Delete account" %}
{% endblock %}
{% block content %}
<div id="real-content">
<div class="block">
<form method="post">
{% csrf_token %}
<p>{% trans "Delete my account and all my personal datas ?" %}</p>
<input type="submit" name="submit" value="{% trans "Yes" %}"/>
<input type="submit" name="cancel" value="{% trans "No" %}"/>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,10 +0,0 @@
{% extends "base.html" %}
{% block content %}
<div id="real-content">
<div class="block">
Au revoir !
</div>
</div>
{% endblock %}

View File

@ -1,9 +0,0 @@
{% extends "registration/base.html" %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Connexion">
</form>
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}
{% endblock %}
{% block content %}
<div id="real-content">
<div id="password-changed">
<p>{% trans "Password changed" %}</p>
<p><a href="/">{% trans "Go back to homepage" %}</a></p>
</div>
</div>
{% endblock %}

View File

@ -1,20 +0,0 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}
{% trans "Changing password" %}
{% endblock %}
{% block content %}
<div id="real-content">
<div class="block">
<h2>Modification du mot de passe</h2>
<form method="post" action=".">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Valider" />
</form>
</div>
</div>
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "registration/base.html" %}
{% load i18n %}
{% block title %}
{% trans "Password reset successfully" %}
{% endblock %}
{% block content %}
<p>{% trans "Password reset successfully" %}</p>
<p><a href="/login">{% trans "Log in" %}</a></p>
{% endblock %}

View File

@ -1,25 +0,0 @@
{% extends "registration/base.html" %}
{% load i18n %}
{% block title %}
{% trans "Resetting password" %}
{% endblock %}
{% block content %}
{% if validlink %}
<form method="post" action=".">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans 'Submit' %}" />
</form>
{% else %}
<p>{% trans "Password reset failed" %}</p>
{% endif %}
{% endblock %}

View File

@ -1,11 +0,0 @@
{% extends "registration/base.html" %}
{% load i18n %}
{% block title %}
{% trans "Resetting password" %}
{% endblock %}
{% block content %}
<p>{% trans "Email with password reset instructions has been sent." %}</p>
{% endblock %}

View File

@ -1,5 +0,0 @@
{% load i18n %}
{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uidb36=uid token=token %}
{% endblock %}

View File

@ -1,18 +0,0 @@
{% extends "registration/base.html" %}
{% load i18n %}
{% block title %}
{% trans "Resetting password" %}
{% endblock %}
{% block content %}
<h2>{% trans "Resetting password" %}</h2>
<form method="post" action=".">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans 'Submit' %}" />
</form>
{% endblock %}

View File

@ -1,11 +0,0 @@
{% extends "registration/base.html" %}
{% load i18n %}
{% block title %}
{% trans "Successful registration" %}
{% endblock %}
{% block content %}
<p>{% trans "You are now registered. Activation email sent." %}</p>
<p><a href="/">{% trans "Back" %}<a/></p>
{% endblock %}

View File

@ -1,35 +0,0 @@
{% extends "registration/base.html" %}
{% load i18n %}
{% block content %}
<div id="registration" class="block">
<h2>Création de votre compte citoyen</h2>
<p>
La création d'un compte citoyen se déroule en 2 étapes :
</p>
<p>
Indiquez ci-dessous vos coordonnées, en veillant à bien indiquer votre
adresse électonique (courriel, email), puis cliquez sur le bouton « Envoyer » ;
Vous recevrez alors un courriel vous permettant d'activer votre compte ; ce
courriel contient un lien sur lequel vous devrez cliquer pour valider la
création du compte.
</p>
<form method="post" action=".">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
<label for="id_{{ field.html_name }}">{{ field.label }}&nbsp;:</label>
{{ field }}
{{ field.errors }}
</p>
{% endfor %}
<input type="submit" value="Valider" />
<button class="submit" type="button" onclick="location.href = '/'">Annuler</button>
</form>
</div>
{% endblock %}

View File

@ -1,56 +0,0 @@
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from django.views.generic.base import RedirectView
admin.autodiscover()
from authentic2.urls import not_homepage_patterns
from . import app_settings
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^admin_tools/', include('admin_tools.urls')),
url(r'^accounts/logout/$', 'django.contrib.auth.views.logout',
name='logout', kwargs={'next_page': '/'}),
)
urlpatterns += patterns('',
(r'^favicon\.ico$', RedirectView.as_view(url=app_settings.FAVICON_URL)),
url(r'^', include(not_homepage_patterns)),
url(r'^su/(?P<username>.*)/$', 'authentic2.views.su', {'redirect_url': '/'}),
url(r'^stats/$', 'portail_citoyen.views.stats'),
url(r'^roles/$', 'portail_citoyen.views.roles'),
)
urlpatterns += staticfiles_urlpatterns()
if settings.DEBUG:
urlpatterns += patterns('',
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
)
if 'msp' in settings.INSTALLED_APPS:
urlpatterns += patterns('',
url('^msp/', include('portail_citoyen.apps.msp.urls')),
)
if 'cms_ajax_text_plugin' in settings.INSTALLED_APPS:
urlpatterns += patterns('',
url('^plugin/', include('cms_ajax_text_plugin.urls')),
)
urlpatterns += i18n_patterns('',
url(r'^', include('cms.urls')),
)

View File

@ -1,34 +0,0 @@
import json
from datetime import timedelta
from django.http import HttpResponse
from django.utils.timezone import now
from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Group
from authentic2.views import EditProfile
from authentic2.saml.models import LibertyFederation, LibertyProvider
edit_profile = login_required(EditProfile.as_view())
def stats(request):
User = get_user_model()
last_day = now() - timedelta(days=1)
last_hour = now() - timedelta(hours=1)
qs = User.objects.all()
what = {
'users_count': qs.count(),
'users_last_connection_less_than_one_day_ago': qs.filter(last_login__gte=last_day).count(),
'user_last_connection_less_than_one_hour_ago': qs.filter(last_login__gte=last_hour).count(),
'active_federations': LibertyFederation.objects.filter(sp__isnull=False).count(),
}
for sp in LibertyProvider.objects.filter(service_provider__isnull=False):
what['%s_active_federations' % sp.slug] = LibertyFederation.objects.filter(sp=sp).count()
return HttpResponse(json.dumps(what), mimetype='application/json')
def roles(request):
what = [{'id': group.id, 'name': group.name} for group in Group.objects.all()]
return HttpResponse(json.dumps(what), mimetype='application/json')

View File

@ -5,7 +5,7 @@ class AppSettings(object):
'TEMPLATE_VARS': {},
'FAVICON_URL': 'http://www.entrouvert.com/favicon.ico',
'WCSINST_DEFAULT_VARIABLES': {},
'PROFILE_FORM_PLUGIN_FORM_CLASS': 'portail_citoyen.forms.ProfileFormPluginForm',
'PROFILE_FORM_PLUGIN_FORM_CLASS': 'portail_citoyen2.forms.ProfileFormPluginForm',
}
__prefix = 'PORTAIL_CITOYEN_'

View File

@ -25,29 +25,53 @@ class Migration(SchemaMigration):
db.send_create_signal(u'auquotidien_plugin', ['AuQuotidienAPI'])
# Adding model 'AuQuotidienActiveFormsPlugin'
db.create_table(u'cmsplugin_auquotidienactiveformsplugin', (
db.create_table(u'auquotidien_plugin_auquotidienactiveformsplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
('refresh', self.gf('django.db.models.fields.IntegerField')(default=60)),
))
db.send_create_signal(u'auquotidien_plugin', ['AuQuotidienActiveFormsPlugin'])
# Adding M2M table for field apis on 'AuQuotidienActiveFormsPlugin'
m2m_table_name = db.shorten_name(u'auquotidien_plugin_auquotidienactiveformsplugin_apis')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('auquotidienactiveformsplugin', models.ForeignKey(orm[u'auquotidien_plugin.auquotidienactiveformsplugin'], null=False)),
('auquotidienapi', models.ForeignKey(orm[u'auquotidien_plugin.auquotidienapi'], null=False))
))
db.create_unique(m2m_table_name, ['auquotidienactiveformsplugin_id', 'auquotidienapi_id'])
# Adding model 'AuQuotidienCategoryPlugin'
db.create_table(u'cmsplugin_auquotidiencategoryplugin', (
db.create_table(u'auquotidien_plugin_auquotidiencategoryplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
('refresh', self.gf('django.db.models.fields.IntegerField')(default=60)),
))
db.send_create_signal(u'auquotidien_plugin', ['AuQuotidienCategoryPlugin'])
# Adding M2M table for field apis on 'AuQuotidienCategoryPlugin'
m2m_table_name = db.shorten_name(u'auquotidien_plugin_auquotidiencategoryplugin_apis')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('auquotidiencategoryplugin', models.ForeignKey(orm[u'auquotidien_plugin.auquotidiencategoryplugin'], null=False)),
('auquotidienapi', models.ForeignKey(orm[u'auquotidien_plugin.auquotidienapi'], null=False))
))
db.create_unique(m2m_table_name, ['auquotidiencategoryplugin_id', 'auquotidienapi_id'])
def backwards(self, orm):
# Deleting model 'AuQuotidienAPI'
db.delete_table(u'auquotidien_plugin_auquotidienapi')
# Deleting model 'AuQuotidienActiveFormsPlugin'
db.delete_table(u'cmsplugin_auquotidienactiveformsplugin')
db.delete_table(u'auquotidien_plugin_auquotidienactiveformsplugin')
# Removing M2M table for field apis on 'AuQuotidienActiveFormsPlugin'
db.delete_table(db.shorten_name(u'auquotidien_plugin_auquotidienactiveformsplugin_apis'))
# Deleting model 'AuQuotidienCategoryPlugin'
db.delete_table(u'cmsplugin_auquotidiencategoryplugin')
db.delete_table(u'auquotidien_plugin_auquotidiencategoryplugin')
# Removing M2M table for field apis on 'AuQuotidienCategoryPlugin'
db.delete_table(db.shorten_name(u'auquotidien_plugin_auquotidiencategoryplugin_apis'))
models = {
@ -73,7 +97,8 @@ class Migration(SchemaMigration):
'namespace': ('django.db.models.fields.CharField', [], {'default': "('Default', 'Default')", 'max_length': '100'})
},
u'auquotidien_plugin.auquotidienactiveformsplugin': {
'Meta': {'object_name': 'AuQuotidienActiveFormsPlugin', 'db_table': "u'cmsplugin_auquotidienactiveformsplugin'", '_ormbases': ['cms.CMSPlugin']},
'Meta': {'object_name': 'AuQuotidienActiveFormsPlugin', '_ormbases': ['cms.CMSPlugin']},
'apis': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auquotidien_plugin.AuQuotidienAPI']", 'symmetrical': 'False'}),
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'})
},
@ -92,7 +117,8 @@ class Migration(SchemaMigration):
'verify_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
u'auquotidien_plugin.auquotidiencategoryplugin': {
'Meta': {'object_name': 'AuQuotidienCategoryPlugin', 'db_table': "u'cmsplugin_auquotidiencategoryplugin'", '_ormbases': ['cms.CMSPlugin']},
'Meta': {'object_name': 'AuQuotidienCategoryPlugin', '_ormbases': ['cms.CMSPlugin']},
'apis': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auquotidien_plugin.AuQuotidienAPI']", 'symmetrical': 'False'}),
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'})
},
@ -177,7 +203,6 @@ class Migration(SchemaMigration):
'encrypt_nameid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'federation_mode': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'forward_slo': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'http_method_for_slo_request': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'idp_initiated_sso': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'iframe_logout_timeout': ('django.db.models.fields.PositiveIntegerField', [], {'default': '300'}),

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: portail_citoyen 0.1.0\n"
"Project-Id-Version: portail_citoyen2 0.1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-11-13 16:06+0100\n"
"PO-Revision-Date: 2013-11-13 16:07+0100\n"

View File

@ -1,14 +1,11 @@
# -*- coding: utf-8 -*-
import datetime
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
depends_on = (
('cms', '0039_auto__del_field_page_moderator_state'),
)
def forwards(self, orm):
# Adding model 'DataSource'
@ -17,6 +14,11 @@ class Migration(SchemaMigration):
('name', self.gf('django.db.models.fields.CharField')(max_length=32)),
('mime_type', self.gf('django.db.models.fields.CharField')(max_length=256)),
('url', self.gf('django.db.models.fields.URLField')(max_length=1024)),
('hash_algo', self.gf('django.db.models.fields.CharField')(default='', max_length=16, blank=True)),
('signature_key', self.gf('django.db.models.fields.CharField')(default='', max_length=128, blank=True)),
('verify_certificate', self.gf('django.db.models.fields.BooleanField')(default=True)),
('allow_redirects', self.gf('django.db.models.fields.BooleanField')(default=True)),
('timeout', self.gf('django.db.models.fields.IntegerField')(default=10)),
))
db.send_create_signal(u'data_source_plugin', ['DataSource'])
@ -30,14 +32,14 @@ class Migration(SchemaMigration):
db.send_create_signal(u'data_source_plugin', ['PluginDataSource'])
# Adding model 'RawInlineTemplatePlugin'
db.create_table(u'cmsplugin_rawinlinetemplateplugin', (
db.create_table(u'data_source_plugin_rawinlinetemplateplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
('template_source', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
))
db.send_create_signal(u'data_source_plugin', ['RawInlineTemplatePlugin'])
# Adding model 'DataSourcePlugin'
db.create_table(u'cmsplugin_datasourceplugin', (
db.create_table(u'data_source_plugin_datasourceplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
('template_source', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
('limit', self.gf('django.db.models.fields.IntegerField')(default=10)),
@ -54,17 +56,17 @@ class Migration(SchemaMigration):
db.delete_table(u'data_source_plugin_plugindatasource')
# Deleting model 'RawInlineTemplatePlugin'
db.delete_table(u'cmsplugin_rawinlinetemplateplugin')
db.delete_table(u'data_source_plugin_rawinlinetemplateplugin')
# Deleting model 'DataSourcePlugin'
db.delete_table(u'cmsplugin_datasourceplugin')
db.delete_table(u'data_source_plugin_datasourceplugin')
models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 4, 10, 0, 0)'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
@ -84,13 +86,18 @@ class Migration(SchemaMigration):
},
u'data_source_plugin.datasource': {
'Meta': {'ordering': "('name',)", 'object_name': 'DataSource'},
'allow_redirects': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'hash_algo': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mime_type': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '1024'})
'signature_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}),
'timeout': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '1024'}),
'verify_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
u'data_source_plugin.datasourceplugin': {
'Meta': {'object_name': 'DataSourcePlugin', 'db_table': "u'cmsplugin_datasourceplugin'"},
'Meta': {'object_name': 'DataSourcePlugin'},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'refresh': ('django.db.models.fields.IntegerField', [], {'default': '60'}),
@ -104,10 +111,10 @@ class Migration(SchemaMigration):
'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plugins'", 'to': u"orm['data_source_plugin.DataSource']"})
},
u'data_source_plugin.rawinlinetemplateplugin': {
'Meta': {'object_name': 'RawInlineTemplatePlugin', 'db_table': "u'cmsplugin_rawinlinetemplateplugin'"},
'Meta': {'object_name': 'RawInlineTemplatePlugin'},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'template_source': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'})
}
}
complete_apps = ['data_source_plugin']
complete_apps = ['data_source_plugin']

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import datetime
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
@ -11,19 +11,19 @@ class Migration(SchemaMigration):
# Adding model 'FeedPreference'
db.create_table(u'feed_plugin_feedpreference', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['portail_citoyen.Citoyen'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
('feed', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['feed_plugin.Feed'])),
))
db.send_create_signal(u'feed_plugin', ['FeedPreference'])
# Adding model 'SelectUserFeed'
db.create_table(u'cmsplugin_selectuserfeed', (
db.create_table(u'feed_plugin_selectuserfeed', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
))
db.send_create_signal(u'feed_plugin', ['SelectUserFeed'])
# Adding model 'ShowUserFeed'
db.create_table(u'cmsplugin_showuserfeed', (
db.create_table(u'feed_plugin_showuserfeed', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
('limit', self.gf('django.db.models.fields.PositiveIntegerField')(default=10)),
('timeout', self.gf('django.db.models.fields.PositiveIntegerField')(default=60)),
@ -35,6 +35,8 @@ class Migration(SchemaMigration):
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=32)),
('url', self.gf('django.db.models.fields.URLField')(max_length=200)),
('color_hex', self.gf('django.db.models.fields.CharField')(max_length=6, blank=True)),
('css_classes', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
))
db.send_create_signal(u'feed_plugin', ['Feed'])
@ -44,10 +46,10 @@ class Migration(SchemaMigration):
db.delete_table(u'feed_plugin_feedpreference')
# Deleting model 'SelectUserFeed'
db.delete_table(u'cmsplugin_selectuserfeed')
db.delete_table(u'feed_plugin_selectuserfeed')
# Deleting model 'ShowUserFeed'
db.delete_table(u'cmsplugin_showuserfeed')
db.delete_table(u'feed_plugin_showuserfeed')
# Deleting model 'Feed'
db.delete_table(u'feed_plugin_feed')
@ -67,6 +69,22 @@ class Migration(SchemaMigration):
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'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': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
@ -97,6 +115,8 @@ class Migration(SchemaMigration):
},
u'feed_plugin.feed': {
'Meta': {'object_name': 'Feed'},
'color_hex': ('django.db.models.fields.CharField', [], {'max_length': '6', 'blank': 'True'}),
'css_classes': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
@ -105,41 +125,17 @@ class Migration(SchemaMigration):
'Meta': {'object_name': 'FeedPreference'},
'feed': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['feed_plugin.Feed']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['portail_citoyen.Citoyen']"})
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'feed_plugin.selectuserfeed': {
'Meta': {'object_name': 'SelectUserFeed', 'db_table': "u'cmsplugin_selectuserfeed'", '_ormbases': ['cms.CMSPlugin']},
'Meta': {'object_name': 'SelectUserFeed', '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'})
},
u'feed_plugin.showuserfeed': {
'Meta': {'object_name': 'ShowUserFeed', 'db_table': "u'cmsplugin_showuserfeed'", '_ormbases': ['cms.CMSPlugin']},
'Meta': {'object_name': 'ShowUserFeed', '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {'default': '10'}),
'timeout': ('django.db.models.fields.PositiveIntegerField', [], {'default': '60'})
},
u'portail_citoyen.citoyen': {
'Meta': {'object_name': 'Citoyen'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'backend': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'backend_id': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'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'}),
'mobile': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '5', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
}
}

View File

@ -1,22 +1,18 @@
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from models import LoginPlugin as LoginPluginModel
from portail_citoyen2.cms_plugins import FormPluginBase
class LoginPlugin(CMSPluginBase):
class LoginPlugin(FormPluginBase):
model = LoginPluginModel
name = _('Login Plugin')
submit_text = _('Log in')
no_cancel_button = True
render_template = "login_plugin/plugin.html"
text_enabled = False
def render(self, context, instance, placeholdre):
context.update({
'form': AuthenticationForm(),
'action': reverse('login'),
})
return context
form_class = AuthenticationForm
add_form_prefix = False
plugin_pool.register_plugin(LoginPlugin)

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: portail_citoyen 0.1.0\n"
"Project-Id-Version: portail_citoyen2 0.1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-19 15:11+0100\n"
"PO-Revision-Date: 2013-03-19 15:15+0100\n"

View File

@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'LoginPlugin'
db.create_table(u'login_plugin_loginplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
))
db.send_create_signal(u'login_plugin', ['LoginPlugin'])
def backwards(self, orm):
# Deleting model 'LoginPlugin'
db.delete_table(u'login_plugin_loginplugin')
models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'login_plugin.loginplugin': {
'Meta': {'object_name': 'LoginPlugin', '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'})
}
}
complete_apps = ['login_plugin']

View File

@ -2,15 +2,12 @@
{% load i18n %}
<div id="login">
{% if not request.user.is_authenticated %}
<form action="{{ action }}" method="post">
<form action="{% url "login" %}?next={{ request.path }}" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Connexion" />
{% if next %}
<input type="hidden" name="next" value="{{ next }}">
{% endif %}
<input type="submit" value="{{ submit_value }}" />
</form>
<p><a href="{% url 'password_reset' %}">Mot de passe perdu ?</a></p>
{% url 'registration_register' as registration_url %}
@ -21,7 +18,7 @@
{% blocktrans with name=request.user %}
<p>Bonjour {{ name }} !</p>
{% endblocktrans %}
{% url 'auth_logout' as logout_url %}
{% if logout_url %}<p><a href="{{ logout_url }}">{% trans "Logout" %}</a></p>{% endif %}
{% csrf_token %}
<p><a href="{% url "logout" %}?next={{ request.path }}">{% trans "Logout" %}</a></p>
{% endif %}
</div>

View File

@ -4,7 +4,7 @@ from django.utils.translation import ugettext_lazy as _
from cms.plugin_pool import plugin_pool
from portail_citoyen.cms_plugins import FormPluginBase
from portail_citoyen2.cms_plugins import FormPluginBase
from . import models, forms

View File

@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'PasserelleRegisterPlugin'
db.create_table(u'passerelle_register_plugin_passerelleregisterplugin', (
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
('passerelle_url', self.gf('django.db.models.fields.URLField')(max_length=128)),
('ressources_restrictions', self.gf('django.db.models.fields.TextField')(blank=True)),
('transports_restrictions', self.gf('django.db.models.fields.TextField')(blank=True)),
))
db.send_create_signal(u'passerelle_register_plugin', ['PasserelleRegisterPlugin'])
def backwards(self, orm):
# Deleting model 'PasserelleRegisterPlugin'
db.delete_table(u'passerelle_register_plugin_passerelleregisterplugin')
models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
u'passerelle_register_plugin.passerelleregisterplugin': {
'Meta': {'object_name': 'PasserelleRegisterPlugin', '_ormbases': ['cms.CMSPlugin']},
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'passerelle_url': ('django.db.models.fields.URLField', [], {'max_length': '128'}),
'ressources_restrictions': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'transports_restrictions': ('django.db.models.fields.TextField', [], {'blank': 'True'})
}
}
complete_apps = ['passerelle_register_plugin']

Some files were not shown because too many files have changed in this diff Show More