wooey / Wooey

A Django app that creates automatic web UIs for Python scripts.
http://wooey.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.13k stars 184 forks source link

value too long for type character varying(255) #273

Closed jigar-p closed 5 years ago

jigar-p commented 5 years ago

I have been trying to figure out a way to have choices that is sentence long each. Since the number of characters exceed 255, I am getting the value too long for type character varying(255). I checked under core.py and tried to change the script_param from CharField to TextField (script_param = models.CharField(max_length=255))). However, that did not work. Any suggestions how I can achieve the goal?

Chris7 commented 5 years ago

You can do that, but you will have to create a migration to alter the database to change the field type from a varchar to a text field. I'm curious about your specific use case though, because if it's useful, Wooey itself can lift the choice limit to be a textfield and you won't have an upgrade incompatibility.

jigar-p commented 5 years ago

Hi Chris, I am working on automating documents. Instead of manually typing out bullet points that in form of sentences, you can simply select one or more from the "choices" menu.

Example:

screen shot 2019-03-06 at 5 59 33 pm

If I add more objectives on the list, I get the value too long for type character varying(255) error. I really think it would be useful feature to have on this amazing project.

Chris7 commented 5 years ago

I think it makes a lot of sense to change it to a TextField. I am pretty swamped atm so not sure when I can get to this, but would be willing to take a PR.

Chris7 commented 5 years ago

Implemented via #280. Going to get a few more patches in and make an official release soon.