cms_plugins,models: remove ProfileFormPlugin empty plugin model

This commit is contained in:
Benjamin Dauvergne 2014-01-27 11:31:40 +01:00
parent 117952da4c
commit eb77d6e4ac
3 changed files with 71 additions and 10 deletions

View File

@ -49,7 +49,7 @@ class FormPluginBase(CMSPluginBase):
class ProfileFormPlugin(FormPluginBase):
model = models.ProfileFormPlugin
model = CMSPlugin
name = _('account form plugin')
render_template = 'portail_citoyen/profile_form_plugin.html'
text_enabled = True

View File

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

View File

@ -1,5 +1,3 @@
from cms.models import pluginmodel, CMSPlugin
from django.db import models
from django.core.validators import RegexValidator, MinLengthValidator, \
MaxLengthValidator
@ -9,7 +7,6 @@ from django.contrib.auth.models import Group
from authentic2.models import AbstractUser
pluginmodel.CMSPlugin.tree = pluginmodel.CMSPlugin.objects
class Citoyen(AbstractUser):
title = models.CharField(pgettext_lazy('person title', 'title'), max_length=16, blank=True,
@ -63,9 +60,3 @@ class Role(Group):
verbose_name_plural = _('roles')
import permission_hack
# CMS plugins
class ProfileFormPlugin(CMSPlugin):
pass