From 34a469a9431dd71c3c09cbd753b2471bc0c1af4c Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 8 Sep 2010 12:05:41 +0200 Subject: [PATCH 1/1] changed null to blank on accesskey --- .../0004_auto__chg_field_button_accesskey.py | 48 +++++++++++++++++++ apps/toolbar/models.py | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 apps/toolbar/migrations/0004_auto__chg_field_button_accesskey.py diff --git a/apps/toolbar/migrations/0004_auto__chg_field_button_accesskey.py b/apps/toolbar/migrations/0004_auto__chg_field_button_accesskey.py new file mode 100644 index 00000000..5f28bf55 --- /dev/null +++ b/apps/toolbar/migrations/0004_auto__chg_field_button_accesskey.py @@ -0,0 +1,48 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Changing field 'Button.accesskey' + db.alter_column('toolbar_button', 'accesskey', self.gf('django.db.models.fields.CharField')(max_length=1)) + + + def backwards(self, orm): + + # Changing field 'Button.accesskey' + db.alter_column('toolbar_button', 'accesskey', self.gf('django.db.models.fields.CharField')(max_length=1, null=True)) + + + models = { + 'toolbar.button': { + 'Meta': {'ordering': "('slug',)", 'object_name': 'Button'}, + 'accesskey': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}), + 'group': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['toolbar.ButtonGroup']", 'symmetrical': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'link': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256', 'blank': 'True'}), + 'params': ('django.db.models.fields.TextField', [], {'default': "'[]'"}), + 'scriptlet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['toolbar.Scriptlet']", 'null': 'True', 'blank': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), + 'tooltip': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}) + }, + 'toolbar.buttongroup': { + 'Meta': {'ordering': "('position', 'name')", 'object_name': 'ButtonGroup'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'position': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}) + }, + 'toolbar.scriptlet': { + 'Meta': {'object_name': 'Scriptlet'}, + 'code': ('django.db.models.fields.TextField', [], {}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}) + } + } + + complete_apps = ['toolbar'] diff --git a/apps/toolbar/models.py b/apps/toolbar/models.py index 3c8ff4f1..a23e3463 100644 --- a/apps/toolbar/models.py +++ b/apps/toolbar/models.py @@ -38,7 +38,7 @@ class Button(models.Model): link = models.CharField(max_length=256, blank=True, default='') # ui related stuff - accesskey = models.CharField(null=True, max_length=1) + accesskey = models.CharField(blank=True, max_length=1) tooltip = models.CharField(blank=True, max_length=120) -- 2.20.1