Adding a padding statement into imageutils, the goal is to allow a padding transparent/white border on pictures when being resized in different aspect ratio.
When packing a compiled app, and distributing it without the non-compiled view views, run_view_in searches only the old style compiled view file: e.g. views_default_index.html.pyc and not in views.default.index.html.pyc, resulting in "invalid view (default/index.html)" 404 Exception.
Added support to use Virtual Fields in autocomplete widget.
Gotchas:
- Using Virtual Fields is slower than normal fields.
- Virtual Fields must be declared with name and table_name attributes.
The problem is only a styling issue and not a HTML one.
It was solved in 864dbe73f2 by adding a `readonly ` class to labels which allow for properly vertical align with CSS.
This reverts commit 353db90a64 which add
specific HTML for some filed types and which breaks display of comments.
On the previous commit we changed text and subject from unicode
to str. After a better solution from @cassiobotaro, we're using
unicode again, selecting the encoding as the one passed via encoding
parameter.
On PR #964 @matclab forced the encoding of both subject and
text variables to unicode.
After merging it, matclab realized that when we send Unicode
text to the method it raises an exception and asked if he should
change the commit. Unfortunately this thing was kept untouched.
This problem exists because we previously encode the unicode variables
to utf-8 (for instance here https://github.com/web2py/web2py/blob/master/gluon/tools.py#L478-L481) and then force again to unicode. This piece of code shows what happens:
```
>>> a = u'áéí'
>>> a
u'\xe1\xe9\xed'
>>> b = a.encode('utf-8')
>>> b
'\xc3\xa1\xc3\xa9\xc3\xad'
>>> unicode(a)
u'\xe1\xe9\xed'
>>> unicode(b)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
```
If we force to str, just like @matclab suggested, we solve this issue.