From: Radek Czajka Date: Wed, 8 Sep 2010 10:05:41 +0000 (+0200) Subject: changed null to blank on accesskey X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/34a469a9431dd71c3c09cbd753b2471bc0c1af4c changed null to blank on accesskey --- 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)