fixed some problems with new dal and SQLHTML

This commit is contained in:
mdipierro
2015-01-27 00:16:45 -06:00
parent 89c5668366
commit 5da5d510a0
3 changed files with 10 additions and 7 deletions
@@ -30,7 +30,7 @@
<tr> <tr>
<td><a class="btn btn-180 btn-success" href="https://dl.dropbox.com/u/18065445/web2py/web2py_manual_5th.pdf">Manual</a></td> <td><a class="btn btn-180 btn-success" href="https://dl.dropbox.com/u/18065445/web2py/web2py_manual_5th.pdf">Manual</a></td>
<td><a class="btn btn-180" href="{{=URL('changelog')}}">Change Log</a></td> <td><a class="btn btn-180" href="{{=URL('changelog')}}">Change Log</a></td>
<td><a class="btn btn-180" href="http://code.google.com/p/web2py/issues/list">Report a Bug</a></td> <td><a class="btn btn-180" href="https://github.com/web2py/web2py/issues">Report a Bug</a></td>
</tr> </tr>
</table> </table>
</center> </center>
+1 -1
View File
@@ -27,7 +27,7 @@ from gluon.html import FORM, INPUT, LABEL, OPTION, SELECT, COL, COLGROUP
from gluon.html import TABLE, THEAD, TBODY, TR, TD, TH, STYLE, SCRIPT from gluon.html import TABLE, THEAD, TBODY, TR, TD, TH, STYLE, SCRIPT
from gluon.html import URL, FIELDSET, P, DEFAULT_PASSWORD_DISPLAY from gluon.html import URL, FIELDSET, P, DEFAULT_PASSWORD_DISPLAY
from pydal.base import DEFAULT from pydal.base import DEFAULT
from pydal.objects import Table, Row, Expression from pydal.objects import Table, Row, Expression, Field
from pydal.adapters.base import CALLABLETYPES from pydal.adapters.base import CALLABLETYPES
from pydal.helpers.methods import smart_query, bar_encode from pydal.helpers.methods import smart_query, bar_encode
from pydal.helpers.classes import Reference, SQLCustomType from pydal.helpers.classes import Reference, SQLCustomType
+8 -5
View File
@@ -57,8 +57,11 @@ def read_file(filename):
finally: finally:
f.close() f.close()
file = sys.argv[1] for file in sys.argv[1:]:
if file[-4:] == '.css': data = read_file(file)
print cleancss(read_file(file)) open(file+'.bak2', 'w').write(data)
if file[-5:] == '.html': if file[-4:] == '.css':
print cleanhtml(read_file(file)) data = cleancss(data)
if file[-5:] == '.html':
data = cleanhtml(data)
open(file, 'w').write(data)