Skip to content

Commit

Permalink
made widget value longer (should fix #86)
Browse files Browse the repository at this point in the history
migrate required
  • Loading branch information
SushiTee committed Feb 7, 2015
1 parent a17913e commit bd195e6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uptee/lib/twconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def read(self):
value += ',{0}'.format(selection)
elif widget[:7] == 'select:':
widget = 'text'
self.options[command] = (value, widget)
self.options[command] = (value[:1000], widget)
self.tunes = [{'command': line.rsplit()[0].strip('"'), 'value': float(line.split()[1].strip('"'))} for line in tunes]
self.votes = [{'command': line.rsplit('" ', 1)[1].strip('"'), 'title': line.rsplit('" ', 1)[0].strip('"')} for line in votes if len(line.split('" ')) == 2]
for line in rcon_commands:
Expand Down
20 changes: 20 additions & 0 deletions uptee/mod/migrations/0002_auto_20150207_1043.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('mod', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='option',
name='value',
field=models.CharField(max_length=1000, blank=True),
preserve_default=True,
),
]
2 changes: 1 addition & 1 deletion uptee/mod/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class Meta:


class Option(Config):
value = models.CharField(blank=True, max_length=500)
value = models.CharField(blank=True, max_length=1000)

WIDGET_TEXT = 1
WIDGET_TEXTAREA = 2
Expand Down

0 comments on commit bd195e6

Please sign in to comment.