diff --git a/MANIFEST.in b/MANIFEST.in index 6f05fa9..fa52e87 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/jenkins.sh b/jenkins.sh index c7942af..5993b75 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -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 diff --git a/portail-citoyen b/portail-citoyen2 similarity index 93% rename from portail-citoyen rename to portail-citoyen2 index 8e71e09..3e13785 100755 --- a/portail-citoyen +++ b/portail-citoyen2 @@ -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 diff --git a/portail-citoyen2.db b/portail-citoyen2.db new file mode 100644 index 0000000..0a0bcf4 Binary files /dev/null and b/portail-citoyen2.db differ diff --git a/portail_citoyen/admin.py b/portail_citoyen/admin.py deleted file mode 100644 index 857c185..0000000 --- a/portail_citoyen/admin.py +++ /dev/null @@ -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']) diff --git a/portail_citoyen/apps/auquotidien_plugin/migrations/0002_auto.py b/portail_citoyen/apps/auquotidien_plugin/migrations/0002_auto.py deleted file mode 100644 index a25f376..0000000 --- a/portail_citoyen/apps/auquotidien_plugin/migrations/0002_auto.py +++ /dev/null @@ -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'] diff --git a/portail_citoyen/apps/data_source_plugin/migrations/0002_auto__add_field_datasource_hash_algo__add_field_datasource_signature_k.py b/portail_citoyen/apps/data_source_plugin/migrations/0002_auto__add_field_datasource_hash_algo__add_field_datasource_signature_k.py deleted file mode 100644 index 1033395..0000000 --- a/portail_citoyen/apps/data_source_plugin/migrations/0002_auto__add_field_datasource_hash_algo__add_field_datasource_signature_k.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/data_source_plugin/migrations/0003_auto__add_field_datasource_verify_certificate.py b/portail_citoyen/apps/data_source_plugin/migrations/0003_auto__add_field_datasource_verify_certificate.py deleted file mode 100644 index 3138ed3..0000000 --- a/portail_citoyen/apps/data_source_plugin/migrations/0003_auto__add_field_datasource_verify_certificate.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/data_source_plugin/migrations/0004_auto__add_field_datasource_allow_redirects.py b/portail_citoyen/apps/data_source_plugin/migrations/0004_auto__add_field_datasource_allow_redirects.py deleted file mode 100644 index affde89..0000000 --- a/portail_citoyen/apps/data_source_plugin/migrations/0004_auto__add_field_datasource_allow_redirects.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/data_source_plugin/migrations/0005_auto__add_field_datasource_timeout.py b/portail_citoyen/apps/data_source_plugin/migrations/0005_auto__add_field_datasource_timeout.py deleted file mode 100644 index 41433a5..0000000 --- a/portail_citoyen/apps/data_source_plugin/migrations/0005_auto__add_field_datasource_timeout.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/feed_plugin/migrations/0002_auto__add_field_feed_css_classes.py b/portail_citoyen/apps/feed_plugin/migrations/0002_auto__add_field_feed_css_classes.py deleted file mode 100644 index 542afef..0000000 --- a/portail_citoyen/apps/feed_plugin/migrations/0002_auto__add_field_feed_css_classes.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/feed_plugin/migrations/0003_auto__del_field_feed_css_classes__add_field_feed_color_hex.py b/portail_citoyen/apps/feed_plugin/migrations/0003_auto__del_field_feed_css_classes__add_field_feed_color_hex.py deleted file mode 100644 index b8df798..0000000 --- a/portail_citoyen/apps/feed_plugin/migrations/0003_auto__del_field_feed_css_classes__add_field_feed_color_hex.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/feed_plugin/migrations/0004_auto__add_field_feed_css_classes.py b/portail_citoyen/apps/feed_plugin/migrations/0004_auto__add_field_feed_css_classes.py deleted file mode 100644 index 5dee071..0000000 --- a/portail_citoyen/apps/feed_plugin/migrations/0004_auto__add_field_feed_css_classes.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/forms.py b/portail_citoyen/forms.py deleted file mode 100644 index 28d072b..0000000 --- a/portail_citoyen/forms.py +++ /dev/null @@ -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 diff --git a/portail_citoyen/management/commands/load-drupal-users.py b/portail_citoyen/management/commands/load-drupal-users.py deleted file mode 100644 index cea5812..0000000 --- a/portail_citoyen/management/commands/load-drupal-users.py +++ /dev/null @@ -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) diff --git a/portail_citoyen/management/commands/load-wcs-roles.py b/portail_citoyen/management/commands/load-wcs-roles.py deleted file mode 100644 index 9c250a0..0000000 --- a/portail_citoyen/management/commands/load-wcs-roles.py +++ /dev/null @@ -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 = '' - 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() diff --git a/portail_citoyen/management/commands/load-wcs-users.py b/portail_citoyen/management/commands/load-wcs-users.py deleted file mode 100644 index 36e6c37..0000000 --- a/portail_citoyen/management/commands/load-wcs-users.py +++ /dev/null @@ -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 = '' - 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() - - - - - - - - diff --git a/portail_citoyen/migrations/0001_rename_authentic2_user_to_citoyen.py b/portail_citoyen/migrations/0001_rename_authentic2_user_to_citoyen.py deleted file mode 100644 index cf45a05..0000000 --- a/portail_citoyen/migrations/0001_rename_authentic2_user_to_citoyen.py +++ /dev/null @@ -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'] diff --git a/portail_citoyen/migrations/0002_auto__del_field_citoyen_postal_address__del_field_citoyen_url__del_fie.py b/portail_citoyen/migrations/0002_auto__del_field_citoyen_postal_address__del_field_citoyen_url__del_fie.py deleted file mode 100644 index af38347..0000000 --- a/portail_citoyen/migrations/0002_auto__del_field_citoyen_postal_address__del_field_citoyen_url__del_fie.py +++ /dev/null @@ -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'] diff --git a/portail_citoyen/migrations/0003_create_role_content_type.py b/portail_citoyen/migrations/0003_create_role_content_type.py deleted file mode 100644 index ecc1a8d..0000000 --- a/portail_citoyen/migrations/0003_create_role_content_type.py +++ /dev/null @@ -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'] diff --git a/portail_citoyen/migrations/0004_auto__add_profileformplugin.py b/portail_citoyen/migrations/0004_auto__add_profileformplugin.py deleted file mode 100644 index 1fa18ae..0000000 --- a/portail_citoyen/migrations/0004_auto__add_profileformplugin.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/migrations/0005_auto__del_profileformplugin.py b/portail_citoyen/migrations/0005_auto__del_profileformplugin.py deleted file mode 100644 index 917424d..0000000 --- a/portail_citoyen/migrations/0005_auto__del_profileformplugin.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/models.py b/portail_citoyen/models.py deleted file mode 100644 index f5af0e3..0000000 --- a/portail_citoyen/models.py +++ /dev/null @@ -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 diff --git a/portail_citoyen/templates/admin/base_site.html b/portail_citoyen/templates/admin/base_site.html deleted file mode 100644 index 68cc561..0000000 --- a/portail_citoyen/templates/admin/base_site.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "admin/base.html" %} -{% load i18n %} - -{% block title %}{{ title }} | Administration du portail citoyen{% endblock %} - -{% block branding %} -

Administration du portail citoyen

-{% endblock %} - -{% block nav-global %}{% endblock %} diff --git a/portail_citoyen/templates/auth/login.html b/portail_citoyen/templates/auth/login.html deleted file mode 100644 index b8d2f7f..0000000 --- a/portail_citoyen/templates/auth/login.html +++ /dev/null @@ -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 %} - -

Bienvenue sur votre Portail Citoyen

-
- -

Un site Internet pour et par l’usager

- -

-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 d’intérêts et de ses envies ! -

- -

-E-services accessibles 24h/24 et 7jrs/7 en un clic, navigation qui s’adapte à -l’internaute… 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 -d’informations à découvrir au fil de votre parcours ou de vos recherches. -

- -

Une offre de services performante

- -

-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 ? -

- -

-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 ». -

- -

-Pour cela il vous suffit de vous connecter avec votre compte citoyen -pour accéder au portail et à ses « e-services ». -

- -

-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. -

- -
- -{% if messages %} - -{% endif %} - -
-{% for name, content in methods %} -{{ content|safe }} -{% endfor %} - -
- -{% if MSP %} - {% with tpl='msp/connecting.html' %} - {% include tpl with popup=1 %} - {% endwith %} -{% endif %} - -
- -{% endblock %} diff --git a/portail_citoyen/templates/auth/login_form.html b/portail_citoyen/templates/auth/login_form.html deleted file mode 100644 index 019cc74..0000000 --- a/portail_citoyen/templates/auth/login_form.html +++ /dev/null @@ -1,16 +0,0 @@ -{% load i18n %} -
-
-{% csrf_token %} -{% include "portail_citoyen/form_fields.html" with form=form %} - -{% if cancel %} - -{% endif %} -
-
- - diff --git a/portail_citoyen/templates/base-cms.html b/portail_citoyen/templates/base-cms.html deleted file mode 100644 index cbd2fa6..0000000 --- a/portail_citoyen/templates/base-cms.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load menu_tags cms_tags sekizai_tags %} - -{% block breadcrumbs %} -
  • {% page_attribute "page_title" %}
  • -{% endblock %} - -{% block content %} -
    - {% placeholder "content" %} -
    -{% endblock %} - -{% block sidebar %} - {% placeholder "sidebar-top" inherit %} - {% placeholder "sidebar" %} -{% endblock %} - -{% block footer %} - {% placeholder "footer" inherit or %}{% show_uncached_placeholder "footer" "extra-placeholders" %}{% endplaceholder %} -{% endblock %} diff --git a/portail_citoyen/templates/extra-placeholders.html b/portail_citoyen/templates/extra-placeholders.html deleted file mode 100644 index d91a9eb..0000000 --- a/portail_citoyen/templates/extra-placeholders.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load menu_tags cms_tags sekizai_tags %} - -{% block content %} -

    Textes supplémentaires pour les pages «systèmes»

    - -

    Connexion

    - {% placeholder "login" %} - {% placeholder "login-sidebar" %} - {% placeholder "logout" %} - -

    Gestion mot de passe

    - {% placeholder "password_change_form" %} - {% placeholder "password_reset_complete" %} - {% placeholder "password_reset_confirm" %} - {% placeholder "password_reset_done" %} - {% placeholder "password_reset_form" %} - -

    Création d'un compte

    - {% placeholder "registration_form" %} - {% placeholder "registration_complete" %} - {% placeholder "activation_complete" %} - -

    Modification d'un compte

    - {% placeholder "edit_profile" %} - {% placeholder "email_change" %} - -{% endblock %} - -{% block footer %} - {% placeholder "footer" %} -{% endblock %} - diff --git a/portail_citoyen/templates/profiles/email_change.html b/portail_citoyen/templates/profiles/email_change.html deleted file mode 100644 index d0de0c5..0000000 --- a/portail_citoyen/templates/profiles/email_change.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %}{% trans "Email change" %}{% endblock %} - -{% block content %} -
    -
    -

    {% blocktrans with email=user.email %}Your current email is {{ email }}{% endblocktrans %}

    -
    - {% csrf_token %} - {{ form.as_p }} - -
    -
    -
    -{% endblock %} diff --git a/portail_citoyen/templates/registration/activation_complete.html b/portail_citoyen/templates/registration/activation_complete.html deleted file mode 100644 index bc2c742..0000000 --- a/portail_citoyen/templates/registration/activation_complete.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} - -{% block content %} -

    -{% trans "Your account is now activated" %} -

    - -

    {% trans "Back" %}

    -{% endblock %} diff --git a/portail_citoyen/templates/registration/activation_email.txt b/portail_citoyen/templates/registration/activation_email.txt deleted file mode 100644 index 2078f5a..0000000 --- a/portail_citoyen/templates/registration/activation_email.txt +++ /dev/null @@ -1,16 +0,0 @@ -Bonjour, - -Vous avez demandé à ouvrir un compte citoyen sur le portail de -démonstration. - -Votre identifiant d’accè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. diff --git a/portail_citoyen/templates/registration/activation_email_subject.txt b/portail_citoyen/templates/registration/activation_email_subject.txt deleted file mode 100644 index e2cd1d0..0000000 --- a/portail_citoyen/templates/registration/activation_email_subject.txt +++ /dev/null @@ -1 +0,0 @@ -Activation de votre compte citoyen diff --git a/portail_citoyen/templates/registration/base.html b/portail_citoyen/templates/registration/base.html deleted file mode 100644 index c974368..0000000 --- a/portail_citoyen/templates/registration/base.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} - -{% block messages %} -{% endblock %} - -{% block menu %} -{% endblock %} diff --git a/portail_citoyen/templates/registration/delete_account.html b/portail_citoyen/templates/registration/delete_account.html deleted file mode 100644 index 0c5cffd..0000000 --- a/portail_citoyen/templates/registration/delete_account.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %} -{% trans "Delete account" %} -{% endblock %} - - -{% block content %} -
    -
    -
    - {% csrf_token %} -

    {% trans "Delete my account and all my personal datas ?" %}

    - - -
    -
    -
    -{% endblock %} diff --git a/portail_citoyen/templates/registration/logged_out.html b/portail_citoyen/templates/registration/logged_out.html deleted file mode 100644 index 2e6c0b9..0000000 --- a/portail_citoyen/templates/registration/logged_out.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -
    -
    - Au revoir ! -
    -
    - -{% endblock %} diff --git a/portail_citoyen/templates/registration/login.html b/portail_citoyen/templates/registration/login.html deleted file mode 100644 index 283e5ff..0000000 --- a/portail_citoyen/templates/registration/login.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "registration/base.html" %} - -{% block content %} -
    - {% csrf_token %} - {{ form.as_p }} - -
    -{% endblock %} diff --git a/portail_citoyen/templates/registration/password_change_done.html b/portail_citoyen/templates/registration/password_change_done.html deleted file mode 100644 index 940aea6..0000000 --- a/portail_citoyen/templates/registration/password_change_done.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %} -{% endblock %} - -{% block content %} -
    -{% endblock %} diff --git a/portail_citoyen/templates/registration/password_change_form.html b/portail_citoyen/templates/registration/password_change_form.html deleted file mode 100644 index 0477552..0000000 --- a/portail_citoyen/templates/registration/password_change_form.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block title %} -{% trans "Changing password" %} -{% endblock %} - -{% block content %} -
    -
    -

    Modification du mot de passe

    -
    - {% csrf_token %} - {{ form.as_p }} - - -
    -
    -
    -{% endblock %} diff --git a/portail_citoyen/templates/registration/password_reset_complete.html b/portail_citoyen/templates/registration/password_reset_complete.html deleted file mode 100644 index 7dcc737..0000000 --- a/portail_citoyen/templates/registration/password_reset_complete.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} - -{% block title %} -{% trans "Password reset successfully" %} -{% endblock %} - -{% block content %} - -

    {% trans "Password reset successfully" %}

    - -

    {% trans "Log in" %}

    - -{% endblock %} diff --git a/portail_citoyen/templates/registration/password_reset_confirm.html b/portail_citoyen/templates/registration/password_reset_confirm.html deleted file mode 100644 index 3323f22..0000000 --- a/portail_citoyen/templates/registration/password_reset_confirm.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} - -{% block title %} -{% trans "Resetting password" %} -{% endblock %} - -{% block content %} - -{% if validlink %} - -
    - {% csrf_token %} - {{ form.as_p }} - - -
    - -{% else %} - -

    {% trans "Password reset failed" %}

    - -{% endif %} - -{% endblock %} diff --git a/portail_citoyen/templates/registration/password_reset_done.html b/portail_citoyen/templates/registration/password_reset_done.html deleted file mode 100644 index 596c198..0000000 --- a/portail_citoyen/templates/registration/password_reset_done.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} - -{% block title %} -{% trans "Resetting password" %} -{% endblock %} - - -{% block content %} -

    {% trans "Email with password reset instructions has been sent." %}

    -{% endblock %} diff --git a/portail_citoyen/templates/registration/password_reset_email.html b/portail_citoyen/templates/registration/password_reset_email.html deleted file mode 100644 index f5f09ec..0000000 --- a/portail_citoyen/templates/registration/password_reset_email.html +++ /dev/null @@ -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 %} diff --git a/portail_citoyen/templates/registration/password_reset_form.html b/portail_citoyen/templates/registration/password_reset_form.html deleted file mode 100644 index 0669eaa..0000000 --- a/portail_citoyen/templates/registration/password_reset_form.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} - -{% block title %} -{% trans "Resetting password" %} -{% endblock %} - -{% block content %} - -

    {% trans "Resetting password" %}

    - -
    - {% csrf_token %} - {{ form.as_p }} - - -
    -{% endblock %} diff --git a/portail_citoyen/templates/registration/registration_complete.html b/portail_citoyen/templates/registration/registration_complete.html deleted file mode 100644 index ad79c79..0000000 --- a/portail_citoyen/templates/registration/registration_complete.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} - -{% block title %} -{% trans "Successful registration" %} -{% endblock %} - -{% block content %} -

    {% trans "You are now registered. Activation email sent." %}

    -

    {% trans "Back" %}

    -{% endblock %} diff --git a/portail_citoyen/templates/registration/registration_form.html b/portail_citoyen/templates/registration/registration_form.html deleted file mode 100644 index a96e13a..0000000 --- a/portail_citoyen/templates/registration/registration_form.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} - -{% block content %} - -
    -

    Création de votre compte citoyen

    - -

    -La création d'un compte citoyen se déroule en 2 étapes : -

    - -

    -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. -

    - -
    - {% csrf_token %} - {{ form.non_field_errors }} - {% for field in form %} - - {{ field }} - {{ field.errors }} -

    - {% endfor %} - - - -
    -
    -{% endblock %} diff --git a/portail_citoyen/urls.py b/portail_citoyen/urls.py deleted file mode 100644 index 0a3183c..0000000 --- a/portail_citoyen/urls.py +++ /dev/null @@ -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.*)/$', '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.*)$', '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')), -) - diff --git a/portail_citoyen/views.py b/portail_citoyen/views.py deleted file mode 100644 index 57cf61e..0000000 --- a/portail_citoyen/views.py +++ /dev/null @@ -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') diff --git a/portail_citoyen/__init__.py b/portail_citoyen2/__init__.py similarity index 100% rename from portail_citoyen/__init__.py rename to portail_citoyen2/__init__.py diff --git a/portail_citoyen/app_settings.py b/portail_citoyen2/app_settings.py similarity index 85% rename from portail_citoyen/app_settings.py rename to portail_citoyen2/app_settings.py index 5f528d8..b537f83 100644 --- a/portail_citoyen/app_settings.py +++ b/portail_citoyen2/app_settings.py @@ -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_' diff --git a/portail_citoyen/apps/__init__.py b/portail_citoyen2/apps/__init__.py similarity index 100% rename from portail_citoyen/apps/__init__.py rename to portail_citoyen2/apps/__init__.py diff --git a/portail_citoyen/apps/auquotidien_plugin/__init__.py b/portail_citoyen2/apps/auquotidien_plugin/__init__.py similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/__init__.py rename to portail_citoyen2/apps/auquotidien_plugin/__init__.py diff --git a/portail_citoyen/apps/auquotidien_plugin/admin.py b/portail_citoyen2/apps/auquotidien_plugin/admin.py similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/admin.py rename to portail_citoyen2/apps/auquotidien_plugin/admin.py diff --git a/portail_citoyen/apps/auquotidien_plugin/cms_plugins.py b/portail_citoyen2/apps/auquotidien_plugin/cms_plugins.py similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/cms_plugins.py rename to portail_citoyen2/apps/auquotidien_plugin/cms_plugins.py diff --git a/portail_citoyen/apps/auquotidien_plugin/locale/fr/LC_MESSAGES/django.po b/portail_citoyen2/apps/auquotidien_plugin/locale/fr/LC_MESSAGES/django.po similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/locale/fr/LC_MESSAGES/django.po rename to portail_citoyen2/apps/auquotidien_plugin/locale/fr/LC_MESSAGES/django.po diff --git a/portail_citoyen/apps/auquotidien_plugin/migrations/0001_initial.py b/portail_citoyen2/apps/auquotidien_plugin/migrations/0001_initial.py similarity index 86% rename from portail_citoyen/apps/auquotidien_plugin/migrations/0001_initial.py rename to portail_citoyen2/apps/auquotidien_plugin/migrations/0001_initial.py index 5d7b9ba..646dae0 100644 --- a/portail_citoyen/apps/auquotidien_plugin/migrations/0001_initial.py +++ b/portail_citoyen2/apps/auquotidien_plugin/migrations/0001_initial.py @@ -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'}), diff --git a/portail_citoyen/apps/auquotidien_plugin/migrations/__init__.py b/portail_citoyen2/apps/auquotidien_plugin/migrations/__init__.py similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/migrations/__init__.py rename to portail_citoyen2/apps/auquotidien_plugin/migrations/__init__.py diff --git a/portail_citoyen/apps/auquotidien_plugin/models.py b/portail_citoyen2/apps/auquotidien_plugin/models.py similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/models.py rename to portail_citoyen2/apps/auquotidien_plugin/models.py diff --git a/portail_citoyen/apps/auquotidien_plugin/static/auquotidien_plugin/js/categories.js b/portail_citoyen2/apps/auquotidien_plugin/static/auquotidien_plugin/js/categories.js similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/static/auquotidien_plugin/js/categories.js rename to portail_citoyen2/apps/auquotidien_plugin/static/auquotidien_plugin/js/categories.js diff --git a/portail_citoyen/apps/auquotidien_plugin/templates/auquotidien_plugin/active_forms.html b/portail_citoyen2/apps/auquotidien_plugin/templates/auquotidien_plugin/active_forms.html similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/templates/auquotidien_plugin/active_forms.html rename to portail_citoyen2/apps/auquotidien_plugin/templates/auquotidien_plugin/active_forms.html diff --git a/portail_citoyen/apps/auquotidien_plugin/templates/auquotidien_plugin/categories.html b/portail_citoyen2/apps/auquotidien_plugin/templates/auquotidien_plugin/categories.html similarity index 100% rename from portail_citoyen/apps/auquotidien_plugin/templates/auquotidien_plugin/categories.html rename to portail_citoyen2/apps/auquotidien_plugin/templates/auquotidien_plugin/categories.html diff --git a/portail_citoyen/apps/data_source_plugin/__init__.py b/portail_citoyen2/apps/data_source_plugin/__init__.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/__init__.py rename to portail_citoyen2/apps/data_source_plugin/__init__.py diff --git a/portail_citoyen/apps/data_source_plugin/admin.py b/portail_citoyen2/apps/data_source_plugin/admin.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/admin.py rename to portail_citoyen2/apps/data_source_plugin/admin.py diff --git a/portail_citoyen/apps/data_source_plugin/cms_plugins.py b/portail_citoyen2/apps/data_source_plugin/cms_plugins.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/cms_plugins.py rename to portail_citoyen2/apps/data_source_plugin/cms_plugins.py diff --git a/portail_citoyen/apps/data_source_plugin/locale/fr/LC_MESSAGES/django.po b/portail_citoyen2/apps/data_source_plugin/locale/fr/LC_MESSAGES/django.po similarity index 98% rename from portail_citoyen/apps/data_source_plugin/locale/fr/LC_MESSAGES/django.po rename to portail_citoyen2/apps/data_source_plugin/locale/fr/LC_MESSAGES/django.po index bb7dbb9..2254639 100644 --- a/portail_citoyen/apps/data_source_plugin/locale/fr/LC_MESSAGES/django.po +++ b/portail_citoyen2/apps/data_source_plugin/locale/fr/LC_MESSAGES/django.po @@ -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" diff --git a/portail_citoyen/apps/data_source_plugin/migrations/0001_initial.py b/portail_citoyen2/apps/data_source_plugin/migrations/0001_initial.py similarity index 79% rename from portail_citoyen/apps/data_source_plugin/migrations/0001_initial.py rename to portail_citoyen2/apps/data_source_plugin/migrations/0001_initial.py index 2449136..d0ed8ee 100644 --- a/portail_citoyen/apps/data_source_plugin/migrations/0001_initial.py +++ b/portail_citoyen2/apps/data_source_plugin/migrations/0001_initial.py @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/data_source_plugin/migrations/__init__.py b/portail_citoyen2/apps/data_source_plugin/migrations/__init__.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/migrations/__init__.py rename to portail_citoyen2/apps/data_source_plugin/migrations/__init__.py diff --git a/portail_citoyen/apps/data_source_plugin/models.py b/portail_citoyen2/apps/data_source_plugin/models.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/models.py rename to portail_citoyen2/apps/data_source_plugin/models.py diff --git a/portail_citoyen/apps/data_source_plugin/signature.py b/portail_citoyen2/apps/data_source_plugin/signature.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/signature.py rename to portail_citoyen2/apps/data_source_plugin/signature.py diff --git a/portail_citoyen/apps/data_source_plugin/templates/data_source_plugin/plugin.html b/portail_citoyen2/apps/data_source_plugin/templates/data_source_plugin/plugin.html similarity index 100% rename from portail_citoyen/apps/data_source_plugin/templates/data_source_plugin/plugin.html rename to portail_citoyen2/apps/data_source_plugin/templates/data_source_plugin/plugin.html diff --git a/portail_citoyen/apps/data_source_plugin/tests.py b/portail_citoyen2/apps/data_source_plugin/tests.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/tests.py rename to portail_citoyen2/apps/data_source_plugin/tests.py diff --git a/portail_citoyen/apps/data_source_plugin/views.py b/portail_citoyen2/apps/data_source_plugin/views.py similarity index 100% rename from portail_citoyen/apps/data_source_plugin/views.py rename to portail_citoyen2/apps/data_source_plugin/views.py diff --git a/portail_citoyen/apps/feed_plugin/__init__.py b/portail_citoyen2/apps/feed_plugin/__init__.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/__init__.py rename to portail_citoyen2/apps/feed_plugin/__init__.py diff --git a/portail_citoyen/apps/feed_plugin/admin.py b/portail_citoyen2/apps/feed_plugin/admin.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/admin.py rename to portail_citoyen2/apps/feed_plugin/admin.py diff --git a/portail_citoyen/apps/feed_plugin/cms_plugins.py b/portail_citoyen2/apps/feed_plugin/cms_plugins.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/cms_plugins.py rename to portail_citoyen2/apps/feed_plugin/cms_plugins.py diff --git a/portail_citoyen/apps/feed_plugin/forms.py b/portail_citoyen2/apps/feed_plugin/forms.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/forms.py rename to portail_citoyen2/apps/feed_plugin/forms.py diff --git a/portail_citoyen/apps/feed_plugin/locale/fr/LC_MESSAGES/django.po b/portail_citoyen2/apps/feed_plugin/locale/fr/LC_MESSAGES/django.po similarity index 100% rename from portail_citoyen/apps/feed_plugin/locale/fr/LC_MESSAGES/django.po rename to portail_citoyen2/apps/feed_plugin/locale/fr/LC_MESSAGES/django.po diff --git a/portail_citoyen/apps/feed_plugin/migrations/0001_initial.py b/portail_citoyen2/apps/feed_plugin/migrations/0001_initial.py similarity index 83% rename from portail_citoyen/apps/feed_plugin/migrations/0001_initial.py rename to portail_citoyen2/apps/feed_plugin/migrations/0001_initial.py index baccb68..a521dc6 100644 --- a/portail_citoyen/apps/feed_plugin/migrations/0001_initial.py +++ b/portail_citoyen2/apps/feed_plugin/migrations/0001_initial.py @@ -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'}) } } diff --git a/portail_citoyen/apps/feed_plugin/migrations/__init__.py b/portail_citoyen2/apps/feed_plugin/migrations/__init__.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/migrations/__init__.py rename to portail_citoyen2/apps/feed_plugin/migrations/__init__.py diff --git a/portail_citoyen/apps/feed_plugin/models.py b/portail_citoyen2/apps/feed_plugin/models.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/models.py rename to portail_citoyen2/apps/feed_plugin/models.py diff --git a/portail_citoyen/apps/feed_plugin/templates/feed_plugin/select_user_feed.html b/portail_citoyen2/apps/feed_plugin/templates/feed_plugin/select_user_feed.html similarity index 100% rename from portail_citoyen/apps/feed_plugin/templates/feed_plugin/select_user_feed.html rename to portail_citoyen2/apps/feed_plugin/templates/feed_plugin/select_user_feed.html diff --git a/portail_citoyen/apps/feed_plugin/templates/feed_plugin/show_user_feed.html b/portail_citoyen2/apps/feed_plugin/templates/feed_plugin/show_user_feed.html similarity index 100% rename from portail_citoyen/apps/feed_plugin/templates/feed_plugin/show_user_feed.html rename to portail_citoyen2/apps/feed_plugin/templates/feed_plugin/show_user_feed.html diff --git a/portail_citoyen/apps/feed_plugin/utils.py b/portail_citoyen2/apps/feed_plugin/utils.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/utils.py rename to portail_citoyen2/apps/feed_plugin/utils.py diff --git a/portail_citoyen/apps/feed_plugin/widgets.py b/portail_citoyen2/apps/feed_plugin/widgets.py similarity index 100% rename from portail_citoyen/apps/feed_plugin/widgets.py rename to portail_citoyen2/apps/feed_plugin/widgets.py diff --git a/portail_citoyen/apps/login_plugin/__init__.py b/portail_citoyen2/apps/login_plugin/__init__.py similarity index 100% rename from portail_citoyen/apps/login_plugin/__init__.py rename to portail_citoyen2/apps/login_plugin/__init__.py diff --git a/portail_citoyen/apps/login_plugin/cms_plugins.py b/portail_citoyen2/apps/login_plugin/cms_plugins.py similarity index 54% rename from portail_citoyen/apps/login_plugin/cms_plugins.py rename to portail_citoyen2/apps/login_plugin/cms_plugins.py index ee01717..590fc2d 100644 --- a/portail_citoyen/apps/login_plugin/cms_plugins.py +++ b/portail_citoyen2/apps/login_plugin/cms_plugins.py @@ -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) diff --git a/portail_citoyen/apps/login_plugin/locale/fr/LC_MESSAGES/django.po b/portail_citoyen2/apps/login_plugin/locale/fr/LC_MESSAGES/django.po similarity index 95% rename from portail_citoyen/apps/login_plugin/locale/fr/LC_MESSAGES/django.po rename to portail_citoyen2/apps/login_plugin/locale/fr/LC_MESSAGES/django.po index d383988..7d066ab 100644 --- a/portail_citoyen/apps/login_plugin/locale/fr/LC_MESSAGES/django.po +++ b/portail_citoyen2/apps/login_plugin/locale/fr/LC_MESSAGES/django.po @@ -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" diff --git a/portail_citoyen2/apps/login_plugin/migrations/0001_initial.py b/portail_citoyen2/apps/login_plugin/migrations/0001_initial.py new file mode 100644 index 0000000..5704490 --- /dev/null +++ b/portail_citoyen2/apps/login_plugin/migrations/0001_initial.py @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/apps/passerelle_register_plugin/__init__.py b/portail_citoyen2/apps/login_plugin/migrations/__init__.py similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/__init__.py rename to portail_citoyen2/apps/login_plugin/migrations/__init__.py diff --git a/portail_citoyen/apps/login_plugin/models.py b/portail_citoyen2/apps/login_plugin/models.py similarity index 100% rename from portail_citoyen/apps/login_plugin/models.py rename to portail_citoyen2/apps/login_plugin/models.py diff --git a/portail_citoyen/apps/login_plugin/templates/login_plugin/plugin.html b/portail_citoyen2/apps/login_plugin/templates/login_plugin/plugin.html similarity index 62% rename from portail_citoyen/apps/login_plugin/templates/login_plugin/plugin.html rename to portail_citoyen2/apps/login_plugin/templates/login_plugin/plugin.html index cb3ee8c..8a3bb4c 100644 --- a/portail_citoyen/apps/login_plugin/templates/login_plugin/plugin.html +++ b/portail_citoyen2/apps/login_plugin/templates/login_plugin/plugin.html @@ -2,15 +2,12 @@ {% load i18n %}
    {% if not request.user.is_authenticated %} -
    + {% csrf_token %} {{ form.as_p }} - - {% if next %} - - {% endif %} +

    Mot de passe perdu ?

    {% url 'registration_register' as registration_url %} @@ -21,7 +18,7 @@ {% blocktrans with name=request.user %}

    Bonjour {{ name }} !

    {% endblocktrans %} - {% url 'auth_logout' as logout_url %} - {% if logout_url %}

    {% trans "Logout" %}

    {% endif %} + {% csrf_token %} +

    {% trans "Logout" %}

    {% endif %}
    diff --git a/portail_citoyen/apps/login_plugin/tests.py b/portail_citoyen2/apps/login_plugin/tests.py similarity index 100% rename from portail_citoyen/apps/login_plugin/tests.py rename to portail_citoyen2/apps/login_plugin/tests.py diff --git a/portail_citoyen/apps/login_plugin/views.py b/portail_citoyen2/apps/login_plugin/views.py similarity index 100% rename from portail_citoyen/apps/login_plugin/views.py rename to portail_citoyen2/apps/login_plugin/views.py diff --git a/portail_citoyen/management/__init__.py b/portail_citoyen2/apps/passerelle_register_plugin/__init__.py similarity index 100% rename from portail_citoyen/management/__init__.py rename to portail_citoyen2/apps/passerelle_register_plugin/__init__.py diff --git a/portail_citoyen/apps/passerelle_register_plugin/cms_plugins.py b/portail_citoyen2/apps/passerelle_register_plugin/cms_plugins.py similarity index 89% rename from portail_citoyen/apps/passerelle_register_plugin/cms_plugins.py rename to portail_citoyen2/apps/passerelle_register_plugin/cms_plugins.py index 977d18b..863c8a1 100644 --- a/portail_citoyen/apps/passerelle_register_plugin/cms_plugins.py +++ b/portail_citoyen2/apps/passerelle_register_plugin/cms_plugins.py @@ -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 diff --git a/portail_citoyen/apps/passerelle_register_plugin/forms.py b/portail_citoyen2/apps/passerelle_register_plugin/forms.py similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/forms.py rename to portail_citoyen2/apps/passerelle_register_plugin/forms.py diff --git a/portail_citoyen/apps/passerelle_register_plugin/locale/fr/LC_MESSAGES/django.po b/portail_citoyen2/apps/passerelle_register_plugin/locale/fr/LC_MESSAGES/django.po similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/locale/fr/LC_MESSAGES/django.po rename to portail_citoyen2/apps/passerelle_register_plugin/locale/fr/LC_MESSAGES/django.po diff --git a/portail_citoyen2/apps/passerelle_register_plugin/migrations/0001_initial.py b/portail_citoyen2/apps/passerelle_register_plugin/migrations/0001_initial.py new file mode 100644 index 0000000..c5892f3 --- /dev/null +++ b/portail_citoyen2/apps/passerelle_register_plugin/migrations/0001_initial.py @@ -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'] \ No newline at end of file diff --git a/portail_citoyen/management/commands/__init__.py b/portail_citoyen2/apps/passerelle_register_plugin/migrations/__init__.py similarity index 100% rename from portail_citoyen/management/commands/__init__.py rename to portail_citoyen2/apps/passerelle_register_plugin/migrations/__init__.py diff --git a/portail_citoyen/apps/passerelle_register_plugin/models.py b/portail_citoyen2/apps/passerelle_register_plugin/models.py similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/models.py rename to portail_citoyen2/apps/passerelle_register_plugin/models.py diff --git a/portail_citoyen/apps/passerelle_register_plugin/templates/passerelle_register_plugin/plugin.html b/portail_citoyen2/apps/passerelle_register_plugin/templates/passerelle_register_plugin/plugin.html similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/templates/passerelle_register_plugin/plugin.html rename to portail_citoyen2/apps/passerelle_register_plugin/templates/passerelle_register_plugin/plugin.html diff --git a/portail_citoyen/apps/passerelle_register_plugin/tests.py b/portail_citoyen2/apps/passerelle_register_plugin/tests.py similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/tests.py rename to portail_citoyen2/apps/passerelle_register_plugin/tests.py diff --git a/portail_citoyen/apps/passerelle_register_plugin/views.py b/portail_citoyen2/apps/passerelle_register_plugin/views.py similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/views.py rename to portail_citoyen2/apps/passerelle_register_plugin/views.py diff --git a/portail_citoyen/apps/passerelle_register_plugin/widgets.py b/portail_citoyen2/apps/passerelle_register_plugin/widgets.py similarity index 100% rename from portail_citoyen/apps/passerelle_register_plugin/widgets.py rename to portail_citoyen2/apps/passerelle_register_plugin/widgets.py diff --git a/portail_citoyen/cms_plugins.py b/portail_citoyen2/cms_plugins.py similarity index 53% rename from portail_citoyen/cms_plugins.py rename to portail_citoyen2/cms_plugins.py index 114ed33..10c5776 100644 --- a/portail_citoyen/cms_plugins.py +++ b/portail_citoyen2/cms_plugins.py @@ -1,19 +1,18 @@ -from django.utils.translation import ugettext_lazy as _, ugettext as _2 +from django.utils.translation import ugettext as _ from django.core.exceptions import ImproperlyConfigured -from django.forms import ModelForm, Form +from django.forms import ModelForm from cms.plugin_base import CMSPluginBase -from cms.plugin_pool import plugin_pool - -from cms.models.pluginmodel import CMSPlugin - -from . import models, utils, app_settings +from . import utils class FormPluginBase(CMSPluginBase): form_class = None no_cancel_button = True + submit_text = None + add_form_prefix = True + cache = False def get_form_class(self, request, context, instance, placeholder): return self.form_class @@ -24,10 +23,12 @@ class FormPluginBase(CMSPluginBase): context['submit_name'] = submit = 'submit-{class_name}-{instance_id}'.format( class_name=class_name, instance_id=instance.id) - context['submit_value'] = _2('Modify') + context['submit_value'] = self.submit_text or _('Modify') context['instance'] = instance context['no_cancel_button'] = self.no_cancel_button - kwargs = {'prefix': class_name} + kwargs = {} + if self.add_form_prefix: + kwargs['prefix'] = class_name form_class = self.get_form_class(request, context, instance, placeholder) if issubclass(form_class, ModelForm): @@ -46,34 +47,3 @@ class FormPluginBase(CMSPluginBase): form = form_class(**kwargs) context['form'] = form return context - - -class ProfileFormPlugin(FormPluginBase): - model = CMSPlugin - name = _('account form plugin') - render_template = 'portail_citoyen/profile_form_plugin.html' - text_enabled = True - - def get_form_class(self, request, context, instance, placeholder): - if request.user.is_anonymous(): - return Form - try: - import importlib - except ImportError: - from django.utils import importlib - form_class_path = app_settings.PROFILE_FORM_PLUGIN_FORM_CLASS - module_path, class_name = form_class_path.rsplit('.', 1) - module = importlib.import_module(module_path) - return getattr(module, class_name) - - def get_object(self, request, context, instance, placeholder): - return request.user -plugin_pool.register_plugin(ProfileFormPlugin) - -class AccountManagementPlugin(CMSPluginBase): - model = CMSPlugin - name = _('account management plugin') - render_template = 'portail_citoyen/account_management_plugin.html' - text_enabled = True - -plugin_pool.register_plugin(AccountManagementPlugin) diff --git a/portail_citoyen/context_processors.py b/portail_citoyen2/context_processors.py similarity index 100% rename from portail_citoyen/context_processors.py rename to portail_citoyen2/context_processors.py diff --git a/portail_citoyen/dashboard.py b/portail_citoyen2/dashboard.py similarity index 95% rename from portail_citoyen/dashboard.py rename to portail_citoyen2/dashboard.py index 41af090..c92b805 100644 --- a/portail_citoyen/dashboard.py +++ b/portail_citoyen2/dashboard.py @@ -10,8 +10,7 @@ class CustomIndexDashboard(Dashboard): # append an app list module for "Applications" self.children.append(modules.ModelList( _('Users and roles'), - models=('django.contrib.auth.models.User', - 'portail_citoyen.models.Role'), + models=('django.contrib.auth.models.User',), )) self.children.append(modules.ModelList( _('Contents'), diff --git a/portail_citoyen/fixtures/demo.json b/portail_citoyen2/fixtures/demo.json similarity index 100% rename from portail_citoyen/fixtures/demo.json rename to portail_citoyen2/fixtures/demo.json diff --git a/portail_citoyen/migrations/__init__.py b/portail_citoyen2/forms.py similarity index 100% rename from portail_citoyen/migrations/__init__.py rename to portail_citoyen2/forms.py diff --git a/portail_citoyen/locale/fr/LC_MESSAGES/django.po b/portail_citoyen2/locale/fr/LC_MESSAGES/django.po similarity index 97% rename from portail_citoyen/locale/fr/LC_MESSAGES/django.po rename to portail_citoyen2/locale/fr/LC_MESSAGES/django.po index d5d643c..74cc8f9 100644 --- a/portail_citoyen/locale/fr/LC_MESSAGES/django.po +++ b/portail_citoyen2/locale/fr/LC_MESSAGES/django.po @@ -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: 2014-01-22 14:32+0100\n" "PO-Revision-Date: 2013-09-06 14:17+0200\n" @@ -492,32 +492,32 @@ msgstr "Pas membre ?" msgid "Register!" msgstr "S'inscrire !" -#: templates/portail_citoyen/account_management_plugin.html:3 +#: templates/portail_citoyen2/account_management_plugin.html:3 msgid "Change email" msgstr "Changer de courriel" -#: templates/portail_citoyen/account_management_plugin.html:4 +#: templates/portail_citoyen2/account_management_plugin.html:4 msgid "Change password" msgstr "Changer de mot de passe" -#: templates/portail_citoyen/account_management_plugin.html:5 +#: templates/portail_citoyen2/account_management_plugin.html:5 #: templates/registration/delete_account.html:5 msgid "Delete account" msgstr "Supprimer votre compte" -#: templates/portail_citoyen/form.html:7 +#: templates/portail_citoyen2/form.html:7 #: templates/registration/password_reset_confirm.html:16 #: templates/registration/password_reset_form.html:16 msgid "Submit" msgstr "Envoyer" -#: templates/portail_citoyen/form.html:9 +#: templates/portail_citoyen2/form.html:9 #: templates/registration/activation_complete.html:9 #: templates/registration/registration_complete.html:10 msgid "Back" msgstr "Retour" -#: templates/portail_citoyen/profile_form_plugin.html:5 +#: templates/portail_citoyen2/profile_form_plugin.html:5 msgid "Email" msgstr "Courriel" diff --git a/portail_citoyen/menu.py b/portail_citoyen2/menu.py similarity index 100% rename from portail_citoyen/menu.py rename to portail_citoyen2/menu.py diff --git a/portail_citoyen2/migrations/0001_initial.py b/portail_citoyen2/migrations/0001_initial.py new file mode 100644 index 0000000..68011a8 --- /dev/null +++ b/portail_citoyen2/migrations/0001_initial.py @@ -0,0 +1,20 @@ +# -*- 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): + pass + + def backwards(self, orm): + pass + + models = { + + } + + complete_apps = ['portail_citoyen2'] \ No newline at end of file diff --git a/portail_citoyen/templatetags/__init__.py b/portail_citoyen2/migrations/__init__.py similarity index 100% rename from portail_citoyen/templatetags/__init__.py rename to portail_citoyen2/migrations/__init__.py diff --git a/portail_citoyen2/models.py b/portail_citoyen2/models.py new file mode 100644 index 0000000..7dcfad9 --- /dev/null +++ b/portail_citoyen2/models.py @@ -0,0 +1,35 @@ +from django.core.validators import MaxLengthValidator +from django.utils.translation import ugettext as _ +from django.db.models.signals import class_prepared + +MAX_USERNAME_LENGTH = 255 + +def longer_username_signal(sender, *args, **kwargs): + if (sender.__name__ == "User" and + sender.__module__ == "django.contrib.auth.models"): + patch_user_model(sender) +class_prepared.connect(longer_username_signal) + +def patch_user_model(model): + field = model._meta.get_field("username") + + field.max_length = MAX_USERNAME_LENGTH + field.help_text = _("Required, %s characters or fewer. Only letters, " + "numbers, and @, ., +, -, or _ " + "characters." % MAX_USERNAME_LENGTH) + + # patch model field validator because validator doesn't change if we change + # max_length + for v in field.validators: + if isinstance(v, MaxLengthValidator): + v.limit_value = MAX_USERNAME_LENGTH + +from django.contrib.auth.models import User + +# https://github.com/GoodCloud/django-longer-username/issues/1 +# django 1.3.X loads User model before class_prepared signal is connected +# so we patch model after it's prepared + +# check if User model is patched +if User._meta.get_field("username").max_length != MAX_USERNAME_LENGTH: + patch_user_model(User) diff --git a/portail_citoyen/permission_hack.py b/portail_citoyen2/permission_hack.py similarity index 100% rename from portail_citoyen/permission_hack.py rename to portail_citoyen2/permission_hack.py diff --git a/portail_citoyen/settings.py b/portail_citoyen2/settings.py similarity index 58% rename from portail_citoyen/settings.py rename to portail_citoyen2/settings.py index 8e02dcf..de0c79d 100644 --- a/portail_citoyen/settings.py +++ b/portail_citoyen2/settings.py @@ -1,17 +1,17 @@ +from django.core.exceptions import ImproperlyConfigured + import os import logging.handlers -from django.conf.global_settings import PASSWORD_HASHERS gettext_noop = lambda s: s # Python dotted path to the WSGI application used by Django's runserver. -WSGI_APPLICATION = 'portail_citoyen.wsgi.application' +WSGI_APPLICATION = 'portail_citoyen2.wsgi.application' DEBUG = 'DEBUG' in os.environ DEBUG_PROPAGATE_EXCEPTIONS = 'DEBUG_PROPAGATE_EXCEPTIONS' in os.environ -USE_DEBUG_TOOLBAR = 'USE_DEBUG_TOOLBAR' in os.environ TEMPLATE_DEBUG = DEBUG PROJECT_PATH = os.path.join(os.path.dirname(__file__)) -PROJECT_NAME = 'portail-citoyen' +PROJECT_NAME = 'portail-citoyen2' ADMINS = () if 'ADMINS' in os.environ: @@ -95,7 +95,7 @@ MIDDLEWARE_CLASSES = ( PORTAIL_CITOYEN_FAVICON_URL = '' -ROOT_URLCONF = 'portail_citoyen.urls' +ROOT_URLCONF = 'portail_citoyen2.urls' if os.environ.get('TEMPLATE_DIRS'): TEMPLATE_DIRS = os.environ['TEMPLATE_DIRS'].split(':') @@ -103,28 +103,6 @@ else: TEMPLATE_DIRS = ('/var/lib/%s/templates' % PROJECT_NAME,) INSTALLED_APPS = ( - 'cms', - 'login_plugin', - 'feed_plugin', - 'data_source_plugin', - 'portail_citoyen', - 'menus', - 'cms.plugins.file', - 'cms.plugins.googlemap', - 'cms.plugins.link', - 'cms.plugins.picture', - 'cms.plugins.snippet', - 'cms.plugins.teaser', - 'cms.plugins.video', - 'cmsplugin_text_wrapper', - 'admin_tools', - 'admin_tools.theming', - 'admin_tools.menu', - 'admin_tools.dashboard', - 'registration', - 'south', - 'mptt', - 'sekizai', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', @@ -132,23 +110,32 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', + 'admin_tools', + 'admin_tools.theming', + 'admin_tools.menu', + 'admin_tools.dashboard', + 'south', + 'mptt', + 'sekizai', + 'cms', + 'menus', + 'djangocms_text_ckeditor', + # 'cmsplugin_text_wrapper', + # 'cms_ajax_text_plugin', + 'passerelle_register_plugin', + 'login_plugin', + 'feed_plugin', + 'data_source_plugin', + 'portail_citoyen2', ) +AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',) + MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' - -# Registration settings -ACCOUNT_ACTIVATION_DAYS = int(os.environ.get('ACCOUNT_ACTIVATION_DAYS', 3)) -PASSWORD_RESET_TIMEOUT_DAYS = int(os.environ.get('PASSWORD_RESET_TIMEOUT_DAYS', 3)) -#A2_REGISTRATION_FORM_CLASS = 'compte_orleans.registration_backend.forms.RegistrationForm' - -# authentication -AUTHENTICATION_BACKENDS = () - # sessions -SESSION_EXPIRE_AT_BROWSER_CLOSE = 'SESSION_EXPIRE_AT_BROWSER_CLOSE' in os.environ -SESSION_COOKIE_AGE = int(os.environ.get('SESSION_COOKIE_AGE', 36000)) # one day of work -SESSION_COOKIE_NAME = os.environ.get('SESSION_COOKIE_NAME', 'sessionid') +SESSION_EXPIRE_AT_BROWSER_CLOSE = True +SESSION_COOKIE_NAME = 'portail-citoyen' SESSION_COOKIE_PATH = os.environ.get('SESSION_COOKIE_PATH', '/') SESSION_COOKIE_SECURE = 'SESSION_COOKIE_SECURE' in os.environ @@ -168,86 +155,21 @@ if 'ALLOWED_HOSTS' in os.environ: else: ALLOWED_HOSTS = ('127.0.0.1', 'localhost') USE_X_FORWARDED_HOST = 'USE_X_FORWARDED_HOST' in os.environ -LOGIN_REDIRECT_URL = os.environ.get('LOGIN_REDIRECT_URL', '/') -LOGIN_URL = os.environ.get('LOGIN_URL', '/login') -LOGOUT_URL = os.environ.get('LOGOUT_URL', '/accounts/logout') if 'INTERNAL_IPS' in os.environ: INTERNAL_IPS = os.environ['INTERNAL_IPS'].split(':') else: INTERNAL_IPS = ('127.0.0.1') -# misc SECRET_KEY = os.environ.get('SECRET_KEY', '0!=(1kc6kri-ui+tmj@mr+*0bvj!(p*r0duu2n=)7@!p=pvf9n') -DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False} -# Authentic2 settings - -DISCO_SERVICE = 'DISCO_SERVICE' in os.environ -DISCO_USE_OF_METADATA = 'DISCO_USE_OF_METADATA' in os.environ - -DISCO_SERVICE_NAME = os.environ.get('DISCO_SERVICE_NAME', "http://www.identity-hub.com/disco_service/disco") -DISCO_RETURN_ID_PARAM = "entityID" -SHOW_DISCO_IN_MD = 'SHOW_DISCO_IN_MD' in os.environ - -SAML_SIGNATURE_PUBLIC_KEY = os.environ.get('SAML_SIGNATURE_PUBLIC_KEY', '''-----BEGIN CERTIFICATE----- -MIIDIzCCAgugAwIBAgIJANUBoick1pDpMA0GCSqGSIb3DQEBBQUAMBUxEzARBgNV -BAoTCkVudHJvdXZlcnQwHhcNMTAxMjE0MTUzMzAyWhcNMTEwMTEzMTUzMzAyWjAV -MRMwEQYDVQQKEwpFbnRyb3V2ZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAvxFkfPdndlGgQPDZgFGXbrNAc/79PULZBuNdWFHDD9P5hNhZn9Kqm4Cp -06Pe/A6u+g5wLnYvbZQcFCgfQAEzziJtb3J55OOlB7iMEI/T2AX2WzrUH8QT8NGh -ABONKU2Gg4XiyeXNhH5R7zdHlUwcWq3ZwNbtbY0TVc+n665EbrfV/59xihSqsoFr -kmBLH0CoepUXtAzA7WDYn8AzusIuMx3n8844pJwgxhTB7Gjuboptlz9Hri8JRdXi -VT9OS9Wt69ubcNoM6zuKASmtm48UuGnhj8v6XwvbjKZrL9kA+xf8ziazZfvvw/VG -Tm+IVFYB7d1x457jY5zjjXJvNysoowIDAQABo3YwdDAdBgNVHQ4EFgQUeF8ePnu0 -fcAK50iBQDgAhHkOu8kwRQYDVR0jBD4wPIAUeF8ePnu0fcAK50iBQDgAhHkOu8mh -GaQXMBUxEzARBgNVBAoTCkVudHJvdXZlcnSCCQDVAaInJNaQ6TAMBgNVHRMEBTAD -AQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAy8l3GhUtpPHx0FxzbRHVaaUSgMwYKGPhE -IdGhqekKUJIx8et4xpEMFBl5XQjBNq/mp5vO3SPb2h2PVSks7xWnG3cvEkqJSOeo -fEEhkqnM45b2MH1S5uxp4i8UilPG6kmQiXU2rEUBdRk9xnRWos7epVivTSIv1Ncp -lG6l41SXp6YgIb2ToT+rOKdIGIQuGDlzeR88fDxWEU0vEujZv/v1PE1YOV0xKjTT -JumlBc6IViKhJeo1wiBBrVRIIkKKevHKQzteK8pWm9CYWculxT26TZ4VWzGbo06j -o2zbumirrLLqnt1gmBDvDvlOwC/zAAyL4chbz66eQHTiIYZZvYgy ------END CERTIFICATE-----''') - -SAML_SIGNATURE_PRIVATE_KEY = os.environ.get('SAML_SIGNATURE_PRIVATE_KEY', '''-----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAvxFkfPdndlGgQPDZgFGXbrNAc/79PULZBuNdWFHDD9P5hNhZ -n9Kqm4Cp06Pe/A6u+g5wLnYvbZQcFCgfQAEzziJtb3J55OOlB7iMEI/T2AX2WzrU -H8QT8NGhABONKU2Gg4XiyeXNhH5R7zdHlUwcWq3ZwNbtbY0TVc+n665EbrfV/59x -ihSqsoFrkmBLH0CoepUXtAzA7WDYn8AzusIuMx3n8844pJwgxhTB7Gjuboptlz9H -ri8JRdXiVT9OS9Wt69ubcNoM6zuKASmtm48UuGnhj8v6XwvbjKZrL9kA+xf8ziaz -Zfvvw/VGTm+IVFYB7d1x457jY5zjjXJvNysoowIDAQABAoIBAQCj8t2iKXya10HG -V6Saaeih8aftoLBV38VwFqqjPU0+iKqDpk2JSXBhjI6s7uFIsaTNJpR2Ga1qvns1 -hJQEDMQSLhJvXfBgSkHylRWCpJentr4E3D7mnw5pRsd61Ev9U+uHcdv/WHP4K5hM -xsdiwXNXD/RYd1Q1+6bKrCuvnNJVmWe0/RV+r3T8Ni5xdMVFbRWt/VEoE620XX6c -a9TQPiA5i/LRVyie+js7Yv+hVjGOlArtuLs6ECQsivfPrqKLOBRWcofKdcf+4N2e -3cieUqwzC15C31vcMliD9Hax9c1iuTt9Q3Xzo20fOSazAnQ5YBEExyTtrFBwbfQu -ku6hp81pAoGBAN6bc6iJtk5ipYpsaY4ZlbqdjjG9KEXB6G1MExPU7SHXOhOF0cDH -/pgMsv9hF2my863MowsOj3OryVhdQhwA6RrV263LRh+JU8NyHV71BwAIfI0BuVfj -6r24KudwtUcvMr9pJIrJyMAMaw5ZyNoX7YqFpS6fcisSJYdSBSoxzrzVAoGBANu6 -xVeMqGavA/EHSOQP3ipDZ3mnWbkDUDxpNhgJG8Q6lZiwKwLoSceJ8z0PNY3VetGA -RbqtqBGfR2mcxHyzeqVBpLnXZC4vs/Vy7lrzTiHDRZk2SG5EkHMSKFA53jN6S/nJ -JWpYZC8lG8w4OHaUfDHFWbptxdGYCgY4//sjeiuXAoGBANuhurJ99R5PnA8AOgEW -4zD1hLc0b4ir8fvshCIcAj9SUB20+afgayRv2ye3Dted1WkUL4WYPxccVhLWKITi -rRtqB03o8m3pG3kJnUr0LIzu0px5J/o8iH3ZOJOTE3iBa+uI/KHmxygc2H+XPGFa -HGeAxuJCNO2kAN0Losbnz5dlAoGAVsCn94gGWPxSjxA0PC7zpTYVnZdwOjbPr/pO -LDE0cEY9GBq98JjrwEd77KibmVMm+Z4uaaT0jXiYhl8pyJ5IFwUS13juCbo1z/u/ -ldMoDvZ8/R/MexTA/1204u/mBecMJiO/jPw3GdIJ5phv2omHe1MSuSNsDfN8Sbap -gmsgaiMCgYB/nrTk89Fp7050VKCNnIt1mHAcO9cBwDV8qrJ5O3rIVmrg1T6vn0aY -wRiVcNacaP+BivkrMjr4BlsUM6yH4MOBsNhLURiiCL+tLJV7U0DWlCse/doWij4U -TKX6tp6oI+7MIJE6ySZ0cBqOiydAkBePZhu57j6ToBkTa0dbHjn1WA== ------END RSA PRIVATE KEY-----''') +LOGIN_REDIRECT_URL = os.environ.get('LOGIN_REDIRECT_URL', '/') SAML_METADATA_ROOT = 'metadata' LOGGING = { 'version': 1, 'disable_existing_loggers': True, - 'filters': { - 'cleaning': { - '()': 'authentic2.utils.CleanLogMessage', - }, - }, 'formatters': { 'syslog': { 'format': 'portail-citoyen(pid=%(process)d) %(levelname)s %(name)s: %(message)s', @@ -264,12 +186,11 @@ LOGGING = { 'facility': logging.handlers.SysLogHandler.LOG_LOCAL0, 'address': '/dev/log', 'max_length': 999, - 'filters': ['cleaning'], }, 'mail_admins': { 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', - 'filters': ['cleaning'], + 'filters': [], }, 'console': { 'class': 'logging.StreamHandler', @@ -278,17 +199,12 @@ LOGGING = { }, }, 'loggers': { - 'authentic2': { - 'handlers': ['mail_admins','syslog'], - 'level': 'DEBUG' if DEBUG else 'INFO', - 'propagate': False, - }, 'requests': { 'handlers': ['mail_admins','syslog'], 'level': 'ERROR', 'propagate': False, }, - 'portail_citoyen': { + 'portail_citoyen2': { 'handlers': ['mail_admins','syslog'], 'level': 'DEBUG' if DEBUG else 'INFO', 'propagate': False, @@ -313,27 +229,32 @@ LOGGING = { SOUTH_TESTS_MIGRATE = False # Admin tools -ADMIN_TOOLS_INDEX_DASHBOARD = 'portail_citoyen.dashboard.CustomIndexDashboard' -ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'portail_citoyen.dashboard.CustomAppIndexDashboard' -ADMIN_TOOLS_MENU = 'portail_citoyen.menu.CustomMenu' +ADMIN_TOOLS_INDEX_DASHBOARD = 'portail_citoyen2.dashboard.CustomIndexDashboard' +ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'portail_citoyen2.dashboard.CustomAppIndexDashboard' +ADMIN_TOOLS_MENU = 'portail_citoyen2.menu.CustomMenu' ADMIN_TOOLS_THEMING_CSS = 'portail_citoyen/css/admin.css' # cms settings CMS_TEMPLATES = ( - ('base_two_columns.html', 'Canevas sur deux colonnes'), - ('base_one_column.html', 'Canevas sur une colonne'), - ('base_help.html', 'Canevas de l\'aide'), + ('portail_citoyen/base_two_columns.html', 'Canevas sur deux colonnes'), + ('portail_citoyen/base_one_column.html', 'Canevas sur une colonne'), + ('portail_citoyen/base_help.html', 'Canevas de l\'aide'), ) +if 'CMS_TEMPLATES' in os.environ: + CMS_TEMPLATES = map(lambda x: x.split(';'), + os.environ('CMS_TEMPLATES').split(':')) CMS_REDIRECTS = True CMS_TEXT_WRAPPERS = ( ('block', { - 'render_template': 'block.html', + 'render_template': 'portail_citoyen/block.html', 'extra_context': {}, }), ) -CMS_TEXT_WRAPPER_CLASSES = () -ANNOUNCES_FEED_HOMEPAGE_LIMIT = int(os.environ.get('ANNOUNCES_FEED_HOMEPAGE_LIMIT', 3)) +CMS_TEXT_WRAPPER_CLASSES = [] +# necessary for plugin displaying a form to have a fresh csrftoken +CMS_PLACEHOLDER_CACHE = False +CMS_PAGE_CACHE = False # Do we use memcached ? if 'USE_MEMCACHED' in os.environ: @@ -346,8 +267,17 @@ if 'USE_MEMCACHED' in os.environ: } SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' -INSTALLED_APPS += ('authentic2.saml', 'authentic2.authsaml2',) -AUTHENTICATION_BACKENDS += ('authentic2.authsaml2.backends.AuthSAML2PersistentBackend',) + +if 'USE_DEBUG_TOOLBAR' in os.environ: + try: + import debug_toolbar + MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) + INSTALLED_APPS += ('debug_toolbar',) + DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False} + except ImportError: + print "Debug toolbar missing, not loaded" + + # try to import local_settings.py (useless, in theory) try: @@ -356,11 +286,5 @@ except ImportError, e: if 'local_settings' in e.args[0]: pass -if USE_DEBUG_TOOLBAR: - try: - import debug_toolbar - MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) - INSTALLED_APPS += ('debug_toolbar',) - except ImportError: - print "Debug toolbar missing, not loaded" - +if not CMS_TEMPLATES: + raise ImproperlyConfigured('You must define CMS_TEMPLATES') diff --git a/portail_citoyen/static/portail_citoyen/css/Museo500-Regular.otf b/portail_citoyen2/static/portail_citoyen/css/Museo500-Regular.otf similarity index 100% rename from portail_citoyen/static/portail_citoyen/css/Museo500-Regular.otf rename to portail_citoyen2/static/portail_citoyen/css/Museo500-Regular.otf diff --git a/portail_citoyen/static/portail_citoyen/css/Museo_Slab.otf b/portail_citoyen2/static/portail_citoyen/css/Museo_Slab.otf similarity index 100% rename from portail_citoyen/static/portail_citoyen/css/Museo_Slab.otf rename to portail_citoyen2/static/portail_citoyen/css/Museo_Slab.otf diff --git a/portail_citoyen/static/portail_citoyen/css/admin.css b/portail_citoyen2/static/portail_citoyen/css/admin.css similarity index 100% rename from portail_citoyen/static/portail_citoyen/css/admin.css rename to portail_citoyen2/static/portail_citoyen/css/admin.css diff --git a/portail_citoyen/static/portail_citoyen/css/button_connexion.gif b/portail_citoyen2/static/portail_citoyen/css/button_connexion.gif similarity index 100% rename from portail_citoyen/static/portail_citoyen/css/button_connexion.gif rename to portail_citoyen2/static/portail_citoyen/css/button_connexion.gif diff --git a/portail_citoyen/static/portail_citoyen/css/e54.png b/portail_citoyen2/static/portail_citoyen/css/e54.png similarity index 100% rename from portail_citoyen/static/portail_citoyen/css/e54.png rename to portail_citoyen2/static/portail_citoyen/css/e54.png diff --git a/portail_citoyen/static/portail_citoyen/css/style.css b/portail_citoyen2/static/portail_citoyen/css/style.css similarity index 100% rename from portail_citoyen/static/portail_citoyen/css/style.css rename to portail_citoyen2/static/portail_citoyen/css/style.css diff --git a/portail_citoyen/static/portail_citoyen/img/logo.png b/portail_citoyen2/static/portail_citoyen/img/logo.png similarity index 100% rename from portail_citoyen/static/portail_citoyen/img/logo.png rename to portail_citoyen2/static/portail_citoyen/img/logo.png diff --git a/portail_citoyen/templates/base.html b/portail_citoyen2/templates/base.html similarity index 94% rename from portail_citoyen/templates/base.html rename to portail_citoyen2/templates/base.html index 07f0280..e64e4a2 100644 --- a/portail_citoyen/templates/base.html +++ b/portail_citoyen2/templates/base.html @@ -11,7 +11,6 @@ {% endblock %} - {% cms_toolbar %}