[web2py] Re: TextWidget maximum

2010-11-01 Thread DenesL
Hi Sergey,

hard to tell without more details.


On Nov 1, 6:10 am, SergeyPo  wrote:
> Thank you guys, it worked!
>
> Don't you know the similar problem: I store an object serialized with
> pickle into a text field in database. Everything is fine except when I
> want to copy serialized object (text) from one web2py instance and
> paste into another. When python tries to materialize the object it
> says that object security in broken.
>
> Sergey
>
> On 29 ÏËÔ, 00:05, howesc  wrote:
>
> > try adding an IS_LENGTH() validator to the field and set the max
> > length high enough. ši don't know for sure, but it sounds like there
> > is a default max length for text widgets (unless you already have a
> > validator that is limiting the size)
>
> > On Oct 28, 7:11šam, SergeyPo  wrote:
>
> > > I need to paste large texts into a db table field using appadmin.
> > > Table field is defined as 'text' and in MySQL is mapped to 'longtext'.
> > > Longtext capacity is 4GB or so... I need to paste approx. 1 Mb of text
> > > into the field.
>
> > > When I do it in web2py appadmin I get an error "enter from 0 to 65536
> > > characters". I believe this is produced by a widget? How is it
> > > possible to disable this limit?


[web2py] Re: TextWidget maximum

2010-11-01 Thread SergeyPo
Thank you guys, it worked!

Don't you know the similar problem: I store an object serialized with
pickle into a text field in database. Everything is fine except when I
want to copy serialized object (text) from one web2py instance and
paste into another. When python tries to materialize the object it
says that object security in broken.

Sergey

On 29 окт, 00:05, howesc  wrote:
> try adding an IS_LENGTH() validator to the field and set the max
> length high enough.  i don't know for sure, but it sounds like there
> is a default max length for text widgets (unless you already have a
> validator that is limiting the size)
>
> On Oct 28, 7:11 am, SergeyPo  wrote:
>
> > I need to paste large texts into a db table field using appadmin.
> > Table field is defined as 'text' and in MySQL is mapped to 'longtext'.
> > Longtext capacity is 4GB or so... I need to paste approx. 1 Mb of text
> > into the field.
>
> > When I do it in web2py appadmin I get an error "enter from 0 to 65536
> > characters". I believe this is produced by a widget? How is it
> > possible to disable this limit?
>
>


[web2py] Re: TextWidget maximum

2010-10-28 Thread howesc
try adding an IS_LENGTH() validator to the field and set the max
length high enough.  i don't know for sure, but it sounds like there
is a default max length for text widgets (unless you already have a
validator that is limiting the size)

On Oct 28, 7:11 am, SergeyPo  wrote:
> I need to paste large texts into a db table field using appadmin.
> Table field is defined as 'text' and in MySQL is mapped to 'longtext'.
> Longtext capacity is 4GB or so... I need to paste approx. 1 Mb of text
> into the field.
>
> When I do it in web2py appadmin I get an error "enter from 0 to 65536
> characters". I believe this is produced by a widget? How is it
> possible to disable this limit?


[web2py] Re: TextWidget maximum

2010-10-28 Thread DenesL
That value comes from the default validator for text fields:
IS_LENGTH(2**16)

To avoid, set it explicitly:
requires=IS_LENGTH(your_max_value)


On Oct 28, 10:11 am, SergeyPo  wrote:
> I need to paste large texts into a db table field using appadmin.
> Table field is defined as 'text' and in MySQL is mapped to 'longtext'.
> Longtext capacity is 4GB or so... I need to paste approx. 1 Mb of text
> into the field.
>
> When I do it in web2py appadmin I get an error "enter from 0 to 65536
> characters". I believe this is produced by a widget? How is it
> possible to disable this limit?