Compare commits
352 Commits
R-2.16.0b1
...
testing
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e4449796e | ||
|
|
4eb82780ea | ||
|
|
09d400fab3 | ||
|
|
59957954fd | ||
|
|
d052d1e06c | ||
|
|
891348986c | ||
|
|
d2290eb3d5 | ||
|
|
3170c360aa | ||
|
|
38482d4846 | ||
|
|
e8df84caa8 | ||
|
|
13ff0877fd | ||
|
|
0226eb5286 | ||
|
|
de256cfb28 | ||
|
|
ad9ed5a9c4 | ||
|
|
a79ec41b3b | ||
|
|
9fb33e6b93 | ||
|
|
8ae34dd8ad | ||
|
|
f0eb120bba | ||
|
|
32aad5531a | ||
|
|
1dea18b8a1 | ||
|
|
bf85a0b8df | ||
|
|
323a8953b5 | ||
|
|
577fcefb33 | ||
|
|
d92820326a | ||
|
|
fa41c255da | ||
|
|
ff3e9ec85b | ||
|
|
2f0f3075b0 | ||
|
|
da23a706e7 | ||
|
|
85dd82e03c | ||
|
|
d6f426ed29 | ||
|
|
ea5ea6a307 | ||
|
|
be197e90e6 | ||
|
|
e5387d5f79 | ||
|
|
43e2ed2fc7 | ||
|
|
cf52195b44 | ||
|
|
94a9bfd05f | ||
|
|
8053d42689 | ||
|
|
039da93b14 | ||
|
|
5df23179b5 | ||
|
|
10171ac4c6 | ||
|
|
ddb2f0ebc3 | ||
|
|
2d500d4cc8 | ||
|
|
53c1f67195 | ||
|
|
1e450ed1d6 | ||
|
|
9f06760fe7 | ||
|
|
bfcb047482 | ||
|
|
77ebad50e3 | ||
|
|
b26e28fda1 | ||
|
|
0900a3ddb9 | ||
|
|
086bfb5851 | ||
|
|
90288a0134 | ||
|
|
de0e63469c | ||
|
|
9b4b412239 | ||
|
|
5de8cb4da5 | ||
|
|
8d4dc1b373 | ||
|
|
cec14c741a | ||
|
|
ff44821f05 | ||
|
|
2237076a5a | ||
|
|
d24bf501e9 | ||
|
|
99455cfb0a | ||
|
|
9b99d8ae6c | ||
|
|
3174990c95 | ||
|
|
a679210649 | ||
|
|
014ddf8248 | ||
|
|
e1531a936f | ||
|
|
f0e939db3a | ||
|
|
2752aba471 | ||
|
|
8b521c0984 | ||
|
|
1452fd3851 | ||
|
|
0fc6bbc744 | ||
|
|
b4673384e5 | ||
|
|
f6d2f8a2a1 | ||
|
|
49204ab24d | ||
|
|
8575b6bf2b | ||
|
|
b16e33ab65 | ||
|
|
dfa6703420 | ||
|
|
f40c041611 | ||
|
|
32e17d4ab2 | ||
|
|
64c427d9f2 | ||
|
|
8d2fa09ef7 | ||
|
|
9cc7cf32e6 | ||
|
|
2bcd0c2f10 | ||
|
|
da2f027501 | ||
|
|
7877220057 | ||
|
|
0c465b27a4 | ||
|
|
b26184b010 | ||
|
|
d83d3535be | ||
|
|
82a4d0b600 | ||
|
|
a037537497 | ||
|
|
fa99620240 | ||
|
|
ee19a48521 | ||
|
|
698ca8bbb8 | ||
|
|
9c6df11459 | ||
|
|
ee4eb3f15a | ||
|
|
ad6fd70de1 | ||
|
|
a0cdad2ddf | ||
|
|
cc8abd0a0f | ||
|
|
f44d617445 | ||
|
|
c17d6bb5d1 | ||
|
|
c9999499bb | ||
|
|
61b5343f66 | ||
|
|
164a271ca8 | ||
|
|
419dc7b5fc | ||
|
|
fa31a6b61b | ||
|
|
7aafd05cbb | ||
|
|
adb85d3061 | ||
|
|
79ba8cb6e4 | ||
|
|
c3355b7457 | ||
|
|
546440ece0 | ||
|
|
44e27bf65f | ||
|
|
82cf2eb44d | ||
|
|
31514060d7 | ||
|
|
1d489d0fde | ||
|
|
f161cc4f3b | ||
|
|
9e02a768cd | ||
|
|
fce88037bd | ||
|
|
009d5ce48c | ||
|
|
e02d5e2a60 | ||
|
|
521d5bce97 | ||
|
|
d1efc8b55d | ||
|
|
ad3c69155b | ||
|
|
421aec162a | ||
|
|
072311fd2c | ||
|
|
5dcbae0b37 | ||
|
|
76f3384aae | ||
|
|
f9606fabde | ||
|
|
623f3b9947 | ||
|
|
f4203ae4d6 | ||
|
|
089359f3ea | ||
|
|
8c9cfff578 | ||
|
|
699513b961 | ||
|
|
b1a9b67c54 | ||
|
|
8fe4d860a1 | ||
|
|
b7b16da08f | ||
|
|
6994cee6c9 | ||
|
|
9bf8ca9c3b | ||
|
|
35a1f6f342 | ||
|
|
f048e45494 | ||
|
|
cfdda257ed | ||
|
|
dca4639b85 | ||
|
|
4ecdc2bc73 | ||
|
|
c7d91108bb | ||
|
|
4697e0e45b | ||
|
|
4f51647b2f | ||
|
|
79b877f6b4 | ||
|
|
553b7cf51a | ||
|
|
20411ce45f | ||
|
|
b11d6f6498 | ||
|
|
44c3c3b0e4 | ||
|
|
e9dcac4ecd | ||
|
|
4a2a02d1fe | ||
|
|
622b29366a | ||
|
|
130e37d708 | ||
|
|
160ec9b044 | ||
|
|
ee8c401020 | ||
|
|
c8a7943e8f | ||
|
|
7bbf6b93f3 | ||
|
|
3410810c1c | ||
|
|
26081782c8 | ||
|
|
b732ab6d53 | ||
|
|
071622b9d9 | ||
|
|
fd0f169a55 | ||
|
|
c9fd0fd71e | ||
|
|
d59e7f35ed | ||
|
|
999e7b7512 | ||
|
|
7035398681 | ||
|
|
2c2c9d3aa2 | ||
|
|
65b3e6dda9 | ||
|
|
d424e5d317 | ||
|
|
a1417df67c | ||
|
|
551c19bcaf | ||
|
|
8aa07760d2 | ||
|
|
8bd8db5edc | ||
|
|
7c1fb6643e | ||
|
|
e44a12eaf8 | ||
|
|
12253ab757 | ||
|
|
30b3d84f24 | ||
|
|
166e268308 | ||
|
|
14e58276cf | ||
|
|
eb7222aa92 | ||
|
|
009a0b87f2 | ||
|
|
aeb0244b2c | ||
|
|
57522ddeb1 | ||
|
|
934042fc04 | ||
|
|
4bfa9c1686 | ||
|
|
925f928843 | ||
|
|
2f5eb409b6 | ||
|
|
228d3c41b6 | ||
|
|
3ab91b9fe9 | ||
|
|
5db3b21437 | ||
|
|
2aa8fd22a2 | ||
|
|
d5eb8d8f17 | ||
|
|
c4e08eeeb3 | ||
|
|
c1a3d5d67e | ||
|
|
b2841de6f3 | ||
|
|
c7d415fefd | ||
|
|
2e572aee9a | ||
|
|
dd14d1c8c9 | ||
|
|
afa5fac074 | ||
|
|
a5b76f1dec | ||
|
|
1e586b32a4 | ||
|
|
dfcffe1a9d | ||
|
|
2e6f529dfd | ||
|
|
0ae3ee506f | ||
|
|
6b103f7e3a | ||
|
|
02c32ebace | ||
|
|
603cc7092a | ||
|
|
8590aae2e8 | ||
|
|
511245a68c | ||
|
|
4a347a4f78 | ||
|
|
5f4c47729b | ||
|
|
5975e4767f | ||
|
|
1800304ade | ||
|
|
9af0d8c3c9 | ||
|
|
2e2d3482e4 | ||
|
|
48cc63741e | ||
|
|
a605e43fa6 | ||
|
|
8eda21ca86 | ||
|
|
e8cf50326d | ||
|
|
27c9250efb | ||
|
|
3ecdd1c11b | ||
|
|
912c22d593 | ||
|
|
4b38186b51 | ||
|
|
83f9016528 | ||
|
|
a6044068cd | ||
|
|
4aefb93ab4 | ||
|
|
2861dc4215 | ||
|
|
087280ec17 | ||
|
|
d06a1f9dc6 | ||
|
|
c06fc67064 | ||
|
|
bd167aa94a | ||
|
|
c9a71a7055 | ||
|
|
02e50cadbc | ||
|
|
9f69ab9753 | ||
|
|
56d10a40c6 | ||
|
|
76b09393e4 | ||
|
|
e880da0d0e | ||
|
|
9694c66703 | ||
|
|
f22e3a7624 | ||
|
|
bd7ee209ea | ||
|
|
5e6c3dba81 | ||
|
|
135f41041d | ||
|
|
1d0f322d09 | ||
|
|
892fba9e54 | ||
|
|
6e5c8b62cc | ||
|
|
852a9e0127 | ||
|
|
485f868cd1 | ||
|
|
de8b2a477b | ||
|
|
8533fa0d00 | ||
|
|
7e96ecafd7 | ||
|
|
86ea728f4f | ||
|
|
a29947f298 | ||
|
|
dc29f33365 | ||
|
|
834460f0cc | ||
|
|
5353e17c66 | ||
|
|
d2022ca500 | ||
|
|
c560f607af | ||
|
|
3eea1f68f4 | ||
|
|
10b6b93cb2 | ||
|
|
0b41ed36f9 | ||
|
|
90e20a4f39 | ||
|
|
a744835f21 | ||
|
|
ebc614bf91 | ||
|
|
b7270df9c3 | ||
|
|
4a47bb8e83 | ||
|
|
213c4ee7d1 | ||
|
|
7088b74d42 | ||
|
|
752b5a8cdb | ||
|
|
56e6d682d6 | ||
|
|
c1881fa205 | ||
|
|
cc2cae5de4 | ||
|
|
cedd74c1ad | ||
|
|
d5167f2ed6 | ||
|
|
1014d3e86e | ||
|
|
f3bba29287 | ||
|
|
cd2ec98a26 | ||
|
|
0e613f2d7f | ||
|
|
561828fa60 | ||
|
|
19efbfecfa | ||
|
|
d43604c3ff | ||
|
|
ec21f72ce3 | ||
|
|
aa0313c59b | ||
|
|
0a013e3edc | ||
|
|
fb4c114d85 | ||
|
|
b47e1334d5 | ||
|
|
ce0b255747 | ||
|
|
05d2ced779 | ||
|
|
d144ff7d65 | ||
|
|
780510dc32 | ||
|
|
7a5f611e76 | ||
|
|
b7b8a009f2 | ||
|
|
113df51ef9 | ||
|
|
4e704ca6f7 | ||
|
|
047ed786ac | ||
|
|
ca1e5156ba | ||
|
|
4854b84ff9 | ||
|
|
aa252cdbd8 | ||
|
|
e3ec4d4075 | ||
|
|
81b000d47a | ||
|
|
305dac4976 | ||
|
|
876cc634a8 | ||
|
|
c004d2c16e | ||
|
|
e3cce4d752 | ||
|
|
2c84b88466 | ||
|
|
fe652c851b | ||
|
|
c183c7b18b | ||
|
|
e2c9875cd5 | ||
|
|
579c54f926 | ||
|
|
b2cb0bc189 | ||
|
|
3f6e8c755a | ||
|
|
023d7f3e6c | ||
|
|
01285ad4cd | ||
|
|
0d855c1e9c | ||
|
|
2d21c00e8d | ||
|
|
de9d0eb895 | ||
|
|
9998916ef6 | ||
|
|
453123a8ed | ||
|
|
2396cad2d1 | ||
|
|
540eecc207 | ||
|
|
83681f3f5d | ||
|
|
b0a01ef720 | ||
|
|
da5543f62e | ||
|
|
dc4ff7c3cc | ||
|
|
0223b0871e | ||
|
|
b3a7c20f3f | ||
|
|
2fc4115718 | ||
|
|
c6c027dbec | ||
|
|
60edb11420 | ||
|
|
51ce3ffd36 | ||
|
|
89832479fc | ||
|
|
15ffdd9a20 | ||
|
|
8505c7b282 | ||
|
|
af7bfac1e2 | ||
|
|
054320820c | ||
|
|
1a52b0ee3b | ||
|
|
78f3af6fc1 | ||
|
|
b5b98d6e19 | ||
|
|
aa1b71e431 | ||
|
|
472c0ff2fb | ||
|
|
58bedd4c1a | ||
|
|
88790dcaee | ||
|
|
a8fb41333b | ||
|
|
8d5464692f | ||
|
|
2080e0460f | ||
|
|
7f5fc798c5 | ||
|
|
833cb03ee1 | ||
|
|
590de9c890 | ||
|
|
583d106104 | ||
|
|
7ada2cf89a | ||
|
|
9f79dccb05 | ||
|
|
69e6e79e23 | ||
|
|
3292f760ca |
16
.travis.yml
16
.travis.yml
@@ -4,11 +4,22 @@ sudo: required
|
||||
|
||||
cache: pip
|
||||
|
||||
dist: "trusty"
|
||||
|
||||
python:
|
||||
- '2.7'
|
||||
- 'pypy'
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
- '3.6-dev'
|
||||
- '3.7-dev'
|
||||
- 'pypy-5.3.1'
|
||||
- 'pypy3.5-5.7.1-beta'
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- python: 'pypy3.5-5.7.1-beta'
|
||||
- python: '3.6-dev'
|
||||
- python: '3.7-dev'
|
||||
|
||||
install:
|
||||
- pip install -e .
|
||||
@@ -33,3 +44,6 @@ notifications:
|
||||
|
||||
addons:
|
||||
postgresql: "9.4"
|
||||
apt:
|
||||
packages:
|
||||
- postgresql-9.4-postgis-2.3
|
||||
|
||||
37
CHANGELOG
37
CHANGELOG
@@ -1,7 +1,18 @@
|
||||
## 2.16.0b1
|
||||
## 2.16.1
|
||||
- pydal 17.11
|
||||
- bootstrap 4
|
||||
- better welcome examples
|
||||
- many bug fixes
|
||||
|
||||
## 2.15.1-4
|
||||
- pydal 17.08
|
||||
- dropped support for python 2.6
|
||||
- dropped web shell
|
||||
- experimental python 3 support
|
||||
- experimental authapi for service login
|
||||
- allow ajax file uploads
|
||||
- more tests
|
||||
- more pep8 compliance
|
||||
- d3.js model visulization
|
||||
- improved scheduler
|
||||
- is_email support for internationalized Domain Names
|
||||
@@ -20,6 +31,13 @@
|
||||
- Updated fpdf to latest version
|
||||
- JWT support
|
||||
- import fabfile for remote deployment
|
||||
- scheduler new feature: you can now specify intervals with cron
|
||||
- gluon/* removed from sys.path. Applications relying on statements like e.g.
|
||||
"from storage import Storage"
|
||||
will need to be rewritten with
|
||||
"from gluon.storage import Storage"
|
||||
- tests can only be run with the usual web2py.py --run_system_tests OR with
|
||||
python -m unittest -v gluon.tests on the root dir
|
||||
- jQuery 3.2.1
|
||||
- PyDAL 17.07 including:
|
||||
allow jsonb support for postgres
|
||||
@@ -30,21 +48,8 @@
|
||||
improved Teradata support
|
||||
improved mongodb support
|
||||
overall refactoring
|
||||
experimental support for Google Cloud SQL v2 (TODO)
|
||||
|
||||
## 2.15.x
|
||||
- web2py does not support python 2.6 anymore
|
||||
- py3.5 syntax compatible (see #1353 for details)
|
||||
- dropped web shell from admin
|
||||
- scheduler new feature: you can now specify intervals with cron
|
||||
- gluon/* removed from sys.path. Applications relying on statements like e.g.
|
||||
"from storage import Storage"
|
||||
will need to be rewritten with
|
||||
"from gluon.storage import Storage"
|
||||
- tests can only be run with the usual web2py.py --run_system_tests OR with
|
||||
python -m unittest -v gluon.tests on the root dir
|
||||
- updated pymysql driver
|
||||
|
||||
experimental support for Google Cloud SQL v2
|
||||
new pymysql driver
|
||||
|
||||
## 2.14.6
|
||||
|
||||
|
||||
16
Makefile
16
Makefile
@@ -30,11 +30,7 @@ update:
|
||||
wget -O gluon/contrib/feedparser.py http://feedparser.googlecode.com/svn/trunk/feedparser/feedparser.py
|
||||
wget -O gluon/contrib/simplejsonrpc.py http://rad2py.googlecode.com/hg/ide2py/simplejsonrpc.py
|
||||
echo "remember that pymysql was tweaked"
|
||||
src:
|
||||
### Use semantic versioning
|
||||
echo 'Version 2.14.6-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
||||
### rm -f all junk files
|
||||
make clean
|
||||
rmfiles:
|
||||
### clean up baisc apps
|
||||
rm -f routes.py
|
||||
rm -rf applications/*/sessions/*
|
||||
@@ -46,6 +42,12 @@ src:
|
||||
rm -rf applications/admin/uploads/*
|
||||
rm -rf applications/welcome/uploads/*
|
||||
rm -rf applications/examples/uploads/*
|
||||
src:
|
||||
### Use semantic versioning
|
||||
echo 'Version 2.16.1-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
||||
### rm -f all junk files
|
||||
#make clean
|
||||
# make rmfiles
|
||||
### make welcome layout and appadmin the default
|
||||
cp applications/welcome/views/appadmin.html applications/admin/views
|
||||
cp applications/welcome/views/appadmin.html applications/examples/views
|
||||
@@ -54,7 +56,7 @@ src:
|
||||
### build web2py_src.zip
|
||||
echo '' > NEWINSTALL
|
||||
mv web2py_src.zip web2py_src_old.zip | echo 'no old'
|
||||
cd ..; zip -r web2py/web2py_src.zip web2py/web2py.py web2py/anyserver.py web2py/gluon/* web2py/extras/* web2py/handlers/* web2py/examples/* web2py/README.markdown web2py/LICENSE web2py/CHANGELOG web2py/NEWINSTALL web2py/VERSION web2py/MANIFEST.in web2py/scripts/*.sh web2py/scripts/*.py web2py/applications/admin web2py/applications/examples/ web2py/applications/welcome web2py/applications/__init__.py web2py/site-packages/__init__.py web2py/gluon/tests/*.sh web2py/gluon/tests/*.py
|
||||
cd ..; zip -r --exclude=**.git** web2py/web2py_src.zip web2py/web2py.py web2py/anyserver.py web2py/fabfile.py web2py/gluon/* web2py/extras/* web2py/handlers/* web2py/examples/* web2py/README.markdown web2py/LICENSE web2py/CHANGELOG web2py/NEWINSTALL web2py/VERSION web2py/MANIFEST.in web2py/scripts/*.sh web2py/scripts/*.py web2py/applications/admin web2py/applications/examples/ web2py/applications/welcome web2py/applications/__init__.py web2py/site-packages/__init__.py web2py/gluon/tests/*.sh web2py/gluon/tests/*.py
|
||||
|
||||
mdp:
|
||||
make src
|
||||
@@ -97,6 +99,8 @@ win:
|
||||
cp -r applications/welcome ../web2py_win/web2py/applications
|
||||
cp -r applications/examples ../web2py_win/web2py/applications
|
||||
cp applications/__init__.py ../web2py_win/web2py/applications
|
||||
# per https://github.com/web2py/web2py/issues/1716
|
||||
mv ../web2py_win/web2py/_ssl.pyd ../web2py_win/web2py/_ssl.pyd.legacy | echo 'done'
|
||||
cd ../web2py_win; zip -r web2py_win.zip web2py
|
||||
mv ../web2py_win/web2py_win.zip .
|
||||
run:
|
||||
|
||||
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.14.6-stable+timestamp.2016.05.09.19.18.48
|
||||
Version 2.16.1-stable+timestamp.2018.03.08.10.23.01
|
||||
|
||||
@@ -392,12 +392,11 @@ def ccache():
|
||||
cache.disk.clear()
|
||||
session.flash += T("Disk Cleared")
|
||||
redirect(URL(r=request))
|
||||
|
||||
|
||||
try:
|
||||
from guppy import hpy
|
||||
hp = hpy()
|
||||
from pympler.asizeof import asizeof
|
||||
except ImportError:
|
||||
hp = False
|
||||
asizeof = False
|
||||
|
||||
import shelve
|
||||
import os
|
||||
@@ -451,9 +450,9 @@ def ccache():
|
||||
ram['ratio'] = 0
|
||||
|
||||
for key, value in iteritems(cache.ram.storage):
|
||||
if hp:
|
||||
ram['bytes'] += hp.iso(value[1]).size
|
||||
ram['objects'] += hp.iso(value[1]).count
|
||||
if asizeof:
|
||||
ram['bytes'] += asizeof(value[1])
|
||||
ram['objects'] += 1
|
||||
ram['entries'] += 1
|
||||
if value[0] < ram['oldest']:
|
||||
ram['oldest'] = value[0]
|
||||
@@ -469,9 +468,9 @@ def ccache():
|
||||
except (KeyError, ZeroDivisionError):
|
||||
disk['ratio'] = 0
|
||||
else:
|
||||
if hp:
|
||||
disk['bytes'] += hp.iso(value[1]).size
|
||||
disk['objects'] += hp.iso(value[1]).count
|
||||
if asizeof:
|
||||
disk['bytes'] += asizeof(value[1])
|
||||
disk['objects'] += 1
|
||||
disk['entries'] += 1
|
||||
if value[0] < disk['oldest']:
|
||||
disk['oldest'] = value[0]
|
||||
@@ -511,7 +510,7 @@ def ccache():
|
||||
total['keys'] = key_table(total['keys'])
|
||||
|
||||
return dict(form=form, total=total,
|
||||
ram=ram, disk=disk, object_stats=hp != False)
|
||||
ram=ram, disk=disk, object_stats=asizeof != False)
|
||||
|
||||
|
||||
def table_template(table):
|
||||
@@ -657,39 +656,38 @@ def d3_graph_model():
|
||||
Create a list of table dicts, called "nodes"
|
||||
"""
|
||||
|
||||
data = {}
|
||||
nodes = []
|
||||
links = []
|
||||
|
||||
subgraphs = dict()
|
||||
for database in databases:
|
||||
db = eval_in_global_env(database)
|
||||
for tablename in db.tables:
|
||||
fields = []
|
||||
for field in db[tablename]:
|
||||
f_type = field.type
|
||||
if not isinstance(f_type,str):
|
||||
disp = ' '
|
||||
elif f_type == 'string':
|
||||
disp = field.length
|
||||
elif f_type == 'id':
|
||||
disp = "PK"
|
||||
elif f_type.startswith('reference') or \
|
||||
f_type.startswith('list:reference'):
|
||||
disp = "FK"
|
||||
else:
|
||||
disp = ' '
|
||||
fields.append(dict(name= field.name, type=field.type, disp = disp))
|
||||
|
||||
for tablename in db.tables:
|
||||
fields = []
|
||||
for field in db[tablename]:
|
||||
f_type = field.type
|
||||
if not isinstance(f_type,str):
|
||||
disp = ' '
|
||||
elif f_type == 'string':
|
||||
disp = field.length
|
||||
elif f_type == 'id':
|
||||
disp = "PK"
|
||||
elif f_type.startswith('reference') or \
|
||||
f_type.startswith('list:reference'):
|
||||
disp = "FK"
|
||||
else:
|
||||
disp = ' '
|
||||
fields.append(dict(name= field.name, type=field.type, disp = disp))
|
||||
if isinstance(f_type,str) and (
|
||||
f_type.startswith('reference') or
|
||||
f_type.startswith('list:reference')):
|
||||
referenced_table = f_type.split()[1].split('.')[0]
|
||||
|
||||
if isinstance(f_type,str) and (
|
||||
f_type.startswith('reference') or
|
||||
f_type.startswith('list:reference')):
|
||||
referenced_table = f_type.split()[1].split('.')[0]
|
||||
links.append(dict(source=tablename, target = referenced_table))
|
||||
|
||||
links.append(dict(source=tablename, target = referenced_table))
|
||||
|
||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||
|
||||
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
||||
response.files.append(URL('static','js/d3.min.js'))
|
||||
response.files.append(URL('static','js/d3_graph.js'))
|
||||
return dict(databases=databases, nodes=nodes, links=links)
|
||||
response.files.append(URL('admin','static','js/d3.min.js'))
|
||||
response.files.append(URL('admin','static','js/d3_graph.js'))
|
||||
return dict(databases=databases, nodes=nodes, links=links)
|
||||
|
||||
@@ -963,8 +963,7 @@ def edit_language():
|
||||
form = SPAN(strings['__corrupted__'], _class='error')
|
||||
return dict(filename=filename, form=form)
|
||||
|
||||
keys = sorted(strings.keys(), lambda x, y: cmp(
|
||||
unicode(x, 'utf-8').lower(), unicode(y, 'utf-8').lower()))
|
||||
keys = sorted(strings.keys(), key=lambda x: to_native(x).lower())
|
||||
rows = []
|
||||
rows.append(H2(T('Original/Translation')))
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import re
|
||||
import gzip
|
||||
import tarfile
|
||||
from gluon.contrib.simplejsonrpc import ServerProxy
|
||||
from gluon._compat import StringIO, ProtocolError
|
||||
from gluon._compat import StringIO, ProtocolError, urlencode, urllib2
|
||||
|
||||
def deploy():
|
||||
response.title = T('Deploy to pythonanywhere')
|
||||
@@ -26,9 +26,8 @@ def create_account():
|
||||
except ProtocolError as error:
|
||||
pass
|
||||
|
||||
import urllib, urllib2
|
||||
url = 'https://www.pythonanywhere.com/api/web2py/create_account'
|
||||
data = urllib.urlencode(request.vars)
|
||||
data = urlencode(request.vars)
|
||||
req = urllib2.Request(url, data)
|
||||
|
||||
try:
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
$.error('web2py.js has already been loaded!');
|
||||
}
|
||||
|
||||
var FORMDATA_IS_SUPPORTED = typeof(FormData) !== 'undefined';
|
||||
var animateIn = 'fadeIn';
|
||||
// var animateIn = 'slideDown';
|
||||
|
||||
String.prototype.reverse = function () {
|
||||
return this.split('').reverse().join('');
|
||||
};
|
||||
@@ -178,7 +182,7 @@
|
||||
},
|
||||
/* manage errors in forms */
|
||||
manage_errors: function (target) {
|
||||
$('div.error', target).hide().slideDown('slow');
|
||||
$('div.error', target).hide()[animateIn]('slow');
|
||||
},
|
||||
after_ajax: function (xhr) {
|
||||
/* called whenever an ajax request completes */
|
||||
@@ -263,13 +267,17 @@
|
||||
}
|
||||
});
|
||||
/* help preventing double form submission for normal form (not LOADed) */
|
||||
$(doc).on('submit', 'form', function () {
|
||||
var submit_button = $(this).find(web2py.formInputClickSelector);
|
||||
web2py.disableElement(submit_button);
|
||||
$(doc).on('submit', 'form', function (e) {
|
||||
var submit_buttons = $(this).find(web2py.formInputClickSelector);
|
||||
submit_buttons.each(function() {
|
||||
web2py.disableElement($(this));
|
||||
})
|
||||
/* safeguard in case the form doesn't trigger a refresh,
|
||||
see https://github.com/web2py/web2py/issues/1100 */
|
||||
setTimeout(function () {
|
||||
web2py.enableElement(submit_button);
|
||||
submit_buttons.each(function() {
|
||||
web2py.enableElement($(this));
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
doc.ajaxSuccess(function (e, xhr) {
|
||||
@@ -320,7 +328,15 @@
|
||||
form.submit(function (e) {
|
||||
web2py.disableElement(form.find(web2py.formInputClickSelector));
|
||||
web2py.hide_flash();
|
||||
web2py.ajax_page('post', url, form.serialize(), target, form);
|
||||
|
||||
var formData;
|
||||
if (FORMDATA_IS_SUPPORTED) {
|
||||
formData = new FormData(form[0]); // Allows file uploads.
|
||||
} else {
|
||||
formData = form.serialize(); // Fallback for older browsers.
|
||||
}
|
||||
web2py.ajax_page('post', url, formData, target, form);
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
form.on('click', web2py.formInputClickSelector, function (e) {
|
||||
@@ -339,11 +355,18 @@
|
||||
if (web2py.isUndefined(element)) element = $(document);
|
||||
/* if target is not there, fill it with something that there isn't in the page*/
|
||||
if (web2py.isUndefined(target) || target === '') target = 'w2p_none';
|
||||
|
||||
/* processData and contentType must be set to false when passing a FormData
|
||||
object to jQuery.ajax. */
|
||||
var isFormData = Object.prototype.toString.call(data) === '[object FormData]';
|
||||
var contentType = isFormData ? false : 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
if (web2py.fire(element, 'ajax:before', null, target)) { /*test a usecase, should stop here if returns false */
|
||||
$.ajax({
|
||||
'type': method,
|
||||
'url': action,
|
||||
'data': data,
|
||||
'processData': !isFormData,
|
||||
'contentType': contentType,
|
||||
'beforeSend': function (xhr, settings) {
|
||||
xhr.setRequestHeader('web2py-component-location', document.location);
|
||||
xhr.setRequestHeader('web2py-component-element', target);
|
||||
@@ -594,8 +617,8 @@
|
||||
flash: function (message, status) {
|
||||
var flash = $('.w2p_flash');
|
||||
web2py.hide_flash();
|
||||
flash.html(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||
flash.text(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>')[animateIn]();
|
||||
},
|
||||
hide_flash: function () {
|
||||
$('.w2p_flash').fadeOut(0).html('');
|
||||
@@ -609,7 +632,7 @@
|
||||
for (var k = 0; k < triggers[id].length; k++) {
|
||||
var dep = $('#' + triggers[id][k], target);
|
||||
var tr = $('#' + triggers[id][k] + '__row', target);
|
||||
if (t.is(dep.attr('data-show-if'))) tr.slideDown();
|
||||
if (t.is(dep.attr('data-show-if'))) tr[animateIn]();
|
||||
else tr.hide();
|
||||
}
|
||||
};
|
||||
@@ -699,8 +722,9 @@
|
||||
});
|
||||
},
|
||||
/* Disables form elements:
|
||||
- Does not disable elements with 'data-w2p_disable' attribute
|
||||
- Caches element value in 'w2p_enable_with' data store
|
||||
- Replaces element text with value of 'data-disable-with' attribute
|
||||
- Replaces element text with value of 'data-w2p_disable_with' attribute
|
||||
- Sets disabled property to true
|
||||
*/
|
||||
disableFormElements: function (form) {
|
||||
@@ -712,13 +736,15 @@
|
||||
if (!web2py.isUndefined(disable)) {
|
||||
return false;
|
||||
}
|
||||
if (web2py.isUndefined(disable_with)) {
|
||||
element.data('w2p_disable_with', element[method]());
|
||||
if (!element.is(':file')) { // Altering file input values is not allowed.
|
||||
if (web2py.isUndefined(disable_with)) {
|
||||
element.data('w2p_disable_with', element[method]());
|
||||
}
|
||||
if (web2py.isUndefined(element.data('w2p_enable_with'))) {
|
||||
element.data('w2p_enable_with', element[method]());
|
||||
}
|
||||
element[method](element.data('w2p_disable_with'));
|
||||
}
|
||||
if (web2py.isUndefined(element.data('w2p_enable_with'))) {
|
||||
element.data('w2p_enable_with', element[method]());
|
||||
}
|
||||
element[method](element.data('w2p_disable_with'));
|
||||
element.prop('disabled', true);
|
||||
});
|
||||
},
|
||||
@@ -799,4 +825,4 @@ web2py_event_handlers = jQuery.web2py.event_handlers;
|
||||
web2py_trap_link = jQuery.web2py.trap_link;
|
||||
web2py_calc_entropy = jQuery.web2py.calc_entropy;
|
||||
*/
|
||||
/* compatibility code - end*/
|
||||
/* compatibility code - end*/
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
{{=T.M("(**%.0d MB**)", total['bytes'] / 1048576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("**not available** (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -176,7 +176,7 @@
|
||||
{{=T.M("(**%.0d MB**)", ram['bytes'] / 10485576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -205,7 +205,7 @@
|
||||
{{=T.M("(**%.0d MB**)", disk['bytes'] / 1048576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -239,7 +239,7 @@
|
||||
{{=T("No databases in this application")}}
|
||||
{{else:}}
|
||||
<div id="vis"></div>
|
||||
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
||||
<link rel="stylesheet" href="{{=URL('admin','static','css/d3_graph.css')}}"/>
|
||||
<script>
|
||||
// Define the d3 input data
|
||||
{{from gluon.serializers import json }}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
{{=T('Manage')}}
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
|
||||
@@ -392,12 +392,11 @@ def ccache():
|
||||
cache.disk.clear()
|
||||
session.flash += T("Disk Cleared")
|
||||
redirect(URL(r=request))
|
||||
|
||||
|
||||
try:
|
||||
from guppy import hpy
|
||||
hp = hpy()
|
||||
from pympler.asizeof import asizeof
|
||||
except ImportError:
|
||||
hp = False
|
||||
asizeof = False
|
||||
|
||||
import shelve
|
||||
import os
|
||||
@@ -451,9 +450,9 @@ def ccache():
|
||||
ram['ratio'] = 0
|
||||
|
||||
for key, value in iteritems(cache.ram.storage):
|
||||
if hp:
|
||||
ram['bytes'] += hp.iso(value[1]).size
|
||||
ram['objects'] += hp.iso(value[1]).count
|
||||
if asizeof:
|
||||
ram['bytes'] += asizeof(value[1])
|
||||
ram['objects'] += 1
|
||||
ram['entries'] += 1
|
||||
if value[0] < ram['oldest']:
|
||||
ram['oldest'] = value[0]
|
||||
@@ -469,9 +468,9 @@ def ccache():
|
||||
except (KeyError, ZeroDivisionError):
|
||||
disk['ratio'] = 0
|
||||
else:
|
||||
if hp:
|
||||
disk['bytes'] += hp.iso(value[1]).size
|
||||
disk['objects'] += hp.iso(value[1]).count
|
||||
if asizeof:
|
||||
disk['bytes'] += asizeof(value[1])
|
||||
disk['objects'] += 1
|
||||
disk['entries'] += 1
|
||||
if value[0] < disk['oldest']:
|
||||
disk['oldest'] = value[0]
|
||||
@@ -511,7 +510,7 @@ def ccache():
|
||||
total['keys'] = key_table(total['keys'])
|
||||
|
||||
return dict(form=form, total=total,
|
||||
ram=ram, disk=disk, object_stats=hp != False)
|
||||
ram=ram, disk=disk, object_stats=asizeof != False)
|
||||
|
||||
|
||||
def table_template(table):
|
||||
@@ -657,37 +656,36 @@ def d3_graph_model():
|
||||
Create a list of table dicts, called "nodes"
|
||||
"""
|
||||
|
||||
data = {}
|
||||
nodes = []
|
||||
links = []
|
||||
|
||||
subgraphs = dict()
|
||||
for database in databases:
|
||||
db = eval_in_global_env(database)
|
||||
for tablename in db.tables:
|
||||
fields = []
|
||||
for field in db[tablename]:
|
||||
f_type = field.type
|
||||
if not isinstance(f_type,str):
|
||||
disp = ' '
|
||||
elif f_type == 'string':
|
||||
disp = field.length
|
||||
elif f_type == 'id':
|
||||
disp = "PK"
|
||||
elif f_type.startswith('reference') or \
|
||||
f_type.startswith('list:reference'):
|
||||
disp = "FK"
|
||||
else:
|
||||
disp = ' '
|
||||
fields.append(dict(name= field.name, type=field.type, disp = disp))
|
||||
|
||||
for tablename in db.tables:
|
||||
fields = []
|
||||
for field in db[tablename]:
|
||||
f_type = field.type
|
||||
if not isinstance(f_type,str):
|
||||
disp = ' '
|
||||
elif f_type == 'string':
|
||||
disp = field.length
|
||||
elif f_type == 'id':
|
||||
disp = "PK"
|
||||
elif f_type.startswith('reference') or \
|
||||
f_type.startswith('list:reference'):
|
||||
disp = "FK"
|
||||
else:
|
||||
disp = ' '
|
||||
fields.append(dict(name= field.name, type=field.type, disp = disp))
|
||||
if isinstance(f_type,str) and (
|
||||
f_type.startswith('reference') or
|
||||
f_type.startswith('list:reference')):
|
||||
referenced_table = f_type.split()[1].split('.')[0]
|
||||
|
||||
if isinstance(f_type,str) and (
|
||||
f_type.startswith('reference') or
|
||||
f_type.startswith('list:reference')):
|
||||
referenced_table = f_type.split()[1].split('.')[0]
|
||||
links.append(dict(source=tablename, target = referenced_table))
|
||||
|
||||
links.append(dict(source=tablename, target = referenced_table))
|
||||
|
||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||
|
||||
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
||||
response.files.append(URL('admin','static','js/d3.min.js'))
|
||||
|
||||
@@ -25,6 +25,9 @@ def division(a, b):
|
||||
"Divide two values "
|
||||
return a / b
|
||||
|
||||
@service.soap('DummyCustomElement', returns={'out0': str}, args={'in0': str}, response_element_name='customResponseTag')
|
||||
def dummy(in0):
|
||||
return in0
|
||||
|
||||
# expose the soap methods
|
||||
|
||||
@@ -51,3 +54,20 @@ def test_soap_sub():
|
||||
xml_response=client.xml_response,
|
||||
result=result)
|
||||
|
||||
def test_custom_response_element_name():
|
||||
from gluon.contrib.pysimplesoap.client import SoapClient, SoapFault
|
||||
# build the url to the WSDL (web service description)
|
||||
# like "http://localhost:8000/webservices/sample/call/soap?WSDL"
|
||||
url = URL(f="call/soap", vars={"WSDL": ""}, scheme=True)
|
||||
# create a SOAP client
|
||||
client = SoapClient(wsdl=url)
|
||||
# call the SOAP remote method
|
||||
try:
|
||||
ret = client.DummyCustomElement(in0="Hello World!")
|
||||
result = ret['out0']
|
||||
except SoapFault as sf:
|
||||
result = sf
|
||||
response.view = "soap_examples/generic.html"
|
||||
return dict(xml_request=client.xml_request,
|
||||
xml_response=client.xml_response,
|
||||
result=result)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
### Community Documentation
|
||||
|
||||
- [[Roadmap https://trello.com/b/d3aqBbBl/web2py-roadmap]]
|
||||
- [[web2pybrasil http://www.web2pybrasil.com.br popup]]
|
||||
- Apostila em português [[Download http://dl.dropbox.com/u/830444/apostila_web2py_basico.pdf popup]] e [[Online http://web2pybrasil.appspot.com/init/plugin_wiki/page/curso-web2py-000 popup]]
|
||||
- [[Sitio en español http://www.web2py.com.ar popup]]
|
||||
- [[Documentación en español http://www.web2py.com.ar/examples/default/docs popup]]
|
||||
- [[Chrome extension to display tickets https://github.com/agarden/web2py-devmode-chrome]]
|
||||
- [[Chrome extension to display tickets https://github.com/agarden/web2py-devmode-chrome]]
|
||||
|
||||
@@ -10,11 +10,8 @@
|
||||
- [[Intro video http://www.youtube.com/watch?v=BXzqmHx6edY]] and [[code examples https://github.com/mjhea0/web2py]]
|
||||
- [[Step by step tutorial https://milesm.pythonanywhere.com/wiki]]
|
||||
- [[web2py Reference Project http://www.web2pyref.com/]]
|
||||
- [[An advanced tutorial https://milesm.pythonanywhere.com/wiki]]
|
||||
- [[Killer Web Development Tutorial http://killer-web-development.com/]]
|
||||
- [[Real Python for the Web http://www.realpython.com]] (web development with web2py and more!)
|
||||
- [[Admin Demo http://www.web2py.com/demo_admin popup]] (web-based IDE)
|
||||
- [[Welcome App Demo http://www.web2py.com/welcome]] (scaffolding application)
|
||||
- [[Videos http://www.web2py.com/examples/default/videos/]]
|
||||
- [[FAQ http://www.web2py.com/AlterEgo popup]]
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
### Official Documentation
|
||||
|
||||
- [[**web2py Online Book (english)** http://web2py.com/book popup]]
|
||||
- [[web2py Online Book (spanish) http://www.latinuxpress.com/books/drafts/web2py/ popup]]
|
||||
- [[web2py Online Book (translations in several languages) http://www.web2py.com/books/default/index popup]]
|
||||
- [[Buy E-book/Printed Version http://stores.lulu.com/web2py popup]]
|
||||
- [[web2py Application Development Cookbook http://www.packtpub.com/web2py-application-development-recipes-to-master-python-web-framework-cookbook/book?utm_source=web2py.com&utm_medium=link&utm_content=pod&utm_campaign=mdb_009617]]
|
||||
- [[Quick Examples http://www.web2py.com/examples/default/examples]]
|
||||
- [[API http://web2py.com/book/default/chapter/04#API popup]]
|
||||
- [[Sphinx (source code documentation) http://web2py.readthedocs.org/en/latest/ popup]]
|
||||
- [[Videos https://vimeo.com/album/3016728]] (edited by Nico Zanferrari)
|
||||
- [[Videos https://vimeo.com/album/3016728]] (edited by Nico Zanferrari)
|
||||
|
||||
@@ -44,9 +44,3 @@ Spanish speakers group
|
||||
|
||||
``web2py-usuarios``:groupdates
|
||||
|
||||
## Chinese Group
|
||||
|
||||
Chinese speakers group
|
||||
|
||||
- [[http://web2py.sinaapp.com/ popup]]
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
- **Created by a community of professionals** and University professors in Computer Science and Software Engineering.
|
||||
- **Always backward compatible.** We have not broken backward compatibility since version 1.0 in 2007, and we pledge not to break it in the future.
|
||||
- **Easy to run.** It requires no installation and no configuration.
|
||||
- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.5/2.6/2.7/pypy, or Java with Jython.
|
||||
- **Runs with** Apache, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI, WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware.
|
||||
- **Talks to** SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres, and Google App Engine.
|
||||
- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.7/3.5/3.6/pypy.
|
||||
- **Runs with** Apache, Nginx, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI, WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware.
|
||||
- **Talks to** SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Sybase, Oracle, IBM DB2, Informix, Ingres, MongoDB, and Google App Engine.
|
||||
- **Secure** [[It prevents the most common types of vulnerabilities http://web2py.com/examples/default/security]] including Cross Site Scripting, Injection Flaws, and Malicious File Execution.
|
||||
- **Enforces good Software Engineering practices** (Model-View-Controller design, Server-side form validation, postbacks) that make the code more readable, scalable, and maintainable.
|
||||
- **Speaks multiple protocols** HTML/XML, RSS/ATOM, RTF, PDF, JSON, AJAX, XML-RPC, CSV, REST, WIKI, Flash/AMF, and Linked Data (RDF).
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
$.error('web2py.js has already been loaded!');
|
||||
}
|
||||
|
||||
var FORMDATA_IS_SUPPORTED = typeof(FormData) !== 'undefined';
|
||||
var animateIn = 'fadeIn';
|
||||
// var animateIn = 'slideDown';
|
||||
|
||||
String.prototype.reverse = function () {
|
||||
return this.split('').reverse().join('');
|
||||
};
|
||||
@@ -178,7 +182,7 @@
|
||||
},
|
||||
/* manage errors in forms */
|
||||
manage_errors: function (target) {
|
||||
$('div.error', target).hide().slideDown('slow');
|
||||
$('div.error', target).hide()[animateIn]('slow');
|
||||
},
|
||||
after_ajax: function (xhr) {
|
||||
/* called whenever an ajax request completes */
|
||||
@@ -263,13 +267,17 @@
|
||||
}
|
||||
});
|
||||
/* help preventing double form submission for normal form (not LOADed) */
|
||||
$(doc).on('submit', 'form', function () {
|
||||
var submit_button = $(this).find(web2py.formInputClickSelector);
|
||||
web2py.disableElement(submit_button);
|
||||
$(doc).on('submit', 'form', function (e) {
|
||||
var submit_buttons = $(this).find(web2py.formInputClickSelector);
|
||||
submit_buttons.each(function() {
|
||||
web2py.disableElement($(this));
|
||||
})
|
||||
/* safeguard in case the form doesn't trigger a refresh,
|
||||
see https://github.com/web2py/web2py/issues/1100 */
|
||||
setTimeout(function () {
|
||||
web2py.enableElement(submit_button);
|
||||
submit_buttons.each(function() {
|
||||
web2py.enableElement($(this));
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
doc.ajaxSuccess(function (e, xhr) {
|
||||
@@ -320,7 +328,15 @@
|
||||
form.submit(function (e) {
|
||||
web2py.disableElement(form.find(web2py.formInputClickSelector));
|
||||
web2py.hide_flash();
|
||||
web2py.ajax_page('post', url, form.serialize(), target, form);
|
||||
|
||||
var formData;
|
||||
if (FORMDATA_IS_SUPPORTED) {
|
||||
formData = new FormData(form[0]); // Allows file uploads.
|
||||
} else {
|
||||
formData = form.serialize(); // Fallback for older browsers.
|
||||
}
|
||||
web2py.ajax_page('post', url, formData, target, form);
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
form.on('click', web2py.formInputClickSelector, function (e) {
|
||||
@@ -339,11 +355,18 @@
|
||||
if (web2py.isUndefined(element)) element = $(document);
|
||||
/* if target is not there, fill it with something that there isn't in the page*/
|
||||
if (web2py.isUndefined(target) || target === '') target = 'w2p_none';
|
||||
|
||||
/* processData and contentType must be set to false when passing a FormData
|
||||
object to jQuery.ajax. */
|
||||
var isFormData = Object.prototype.toString.call(data) === '[object FormData]';
|
||||
var contentType = isFormData ? false : 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
if (web2py.fire(element, 'ajax:before', null, target)) { /*test a usecase, should stop here if returns false */
|
||||
$.ajax({
|
||||
'type': method,
|
||||
'url': action,
|
||||
'data': data,
|
||||
'processData': !isFormData,
|
||||
'contentType': contentType,
|
||||
'beforeSend': function (xhr, settings) {
|
||||
xhr.setRequestHeader('web2py-component-location', document.location);
|
||||
xhr.setRequestHeader('web2py-component-element', target);
|
||||
@@ -594,8 +617,8 @@
|
||||
flash: function (message, status) {
|
||||
var flash = $('.w2p_flash');
|
||||
web2py.hide_flash();
|
||||
flash.html(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||
flash.text(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>')[animateIn]();
|
||||
},
|
||||
hide_flash: function () {
|
||||
$('.w2p_flash').fadeOut(0).html('');
|
||||
@@ -609,7 +632,7 @@
|
||||
for (var k = 0; k < triggers[id].length; k++) {
|
||||
var dep = $('#' + triggers[id][k], target);
|
||||
var tr = $('#' + triggers[id][k] + '__row', target);
|
||||
if (t.is(dep.attr('data-show-if'))) tr.slideDown();
|
||||
if (t.is(dep.attr('data-show-if'))) tr[animateIn]();
|
||||
else tr.hide();
|
||||
}
|
||||
};
|
||||
@@ -699,8 +722,9 @@
|
||||
});
|
||||
},
|
||||
/* Disables form elements:
|
||||
- Does not disable elements with 'data-w2p_disable' attribute
|
||||
- Caches element value in 'w2p_enable_with' data store
|
||||
- Replaces element text with value of 'data-disable-with' attribute
|
||||
- Replaces element text with value of 'data-w2p_disable_with' attribute
|
||||
- Sets disabled property to true
|
||||
*/
|
||||
disableFormElements: function (form) {
|
||||
@@ -712,13 +736,15 @@
|
||||
if (!web2py.isUndefined(disable)) {
|
||||
return false;
|
||||
}
|
||||
if (web2py.isUndefined(disable_with)) {
|
||||
element.data('w2p_disable_with', element[method]());
|
||||
if (!element.is(':file')) { // Altering file input values is not allowed.
|
||||
if (web2py.isUndefined(disable_with)) {
|
||||
element.data('w2p_disable_with', element[method]());
|
||||
}
|
||||
if (web2py.isUndefined(element.data('w2p_enable_with'))) {
|
||||
element.data('w2p_enable_with', element[method]());
|
||||
}
|
||||
element[method](element.data('w2p_disable_with'));
|
||||
}
|
||||
if (web2py.isUndefined(element.data('w2p_enable_with'))) {
|
||||
element.data('w2p_enable_with', element[method]());
|
||||
}
|
||||
element[method](element.data('w2p_disable_with'));
|
||||
element.prop('disabled', true);
|
||||
});
|
||||
},
|
||||
@@ -799,4 +825,4 @@ web2py_event_handlers = jQuery.web2py.event_handlers;
|
||||
web2py_trap_link = jQuery.web2py.trap_link;
|
||||
web2py_calc_entropy = jQuery.web2py.calc_entropy;
|
||||
*/
|
||||
/* compatibility code - end*/
|
||||
/* compatibility code - end*/
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
{{=T.M("(**%.0d MB**)", total['bytes'] / 1048576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("**not available** (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -176,7 +176,7 @@
|
||||
{{=T.M("(**%.0d MB**)", ram['bytes'] / 10485576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -205,7 +205,7 @@
|
||||
{{=T.M("(**%.0d MB**)", disk['bytes'] / 1048576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -239,7 +239,7 @@
|
||||
{{=T("No databases in this application")}}
|
||||
{{else:}}
|
||||
<div id="vis"></div>
|
||||
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
||||
<link rel="stylesheet" href="{{=URL('admin','static','css/d3_graph.css')}}"/>
|
||||
<script>
|
||||
// Define the d3 input data
|
||||
{{from gluon.serializers import json }}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="btn btn180 rounded green" href="https://dl.dropbox.com/u/18065445/web2py/web2py_manual_5th.pdf">Manual</a>
|
||||
<a class="btn btn180 rounded green" href="http://mdipierro.github.io/web2py/web2py_manual_5th.pdf">Manual</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn180 rounded" href="https://github.com/web2py/web2py/releases">Change Log</a>
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<h3 id="license">License</h3>
|
||||
<p>Web2py code is released under <a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>. This license does not extend to third party libraries distributed with web2py (which can be MIT, BSD or Apache type licenses) nor does it extend to applications built with web2py (under the terms of the LGPL.</p>
|
||||
<p>Applications built with web2py can be released under any license the author wishes as long they do not contain web2py code. They can link unmodified web2py libraries and they can be distributed with official web2py binaries. In particular web2py applications can be distributed in closed source. The admin interface provides a button to byte-code compile.</p>
|
||||
<p>Applications built with web2py can be released under any license the author wishes as long as they do not contain web2py code. They can link unmodified web2py libraries and they can be distributed with official web2py binaries. In particular web2py applications can be distributed in closed source. The admin interface provides a button to byte-code compile.</p>
|
||||
<p>It is fine to distribute web2py (source or compiled) with your applications as long as you make it clear in the license where your application ends and web2py starts.</p>
|
||||
<p>web2py is copyrighted by Massimo Di Pierro. The web2py trademark is owned by Massimo Di Pierro.</p>
|
||||
<a class="btn btn-small rounded" href="{{=URL('license')}}">read more</a>
|
||||
|
||||
@@ -50,10 +50,10 @@ def hello3():
|
||||
|
||||
<b>and view: simple_examples/hello3.html</b>
|
||||
{{=CODE(open(os.path.join(request.folder,'views/simple_examples/hello3.html'),'r').read(),language='html',link=URL('global','vars'),_class='boxCode')}}
|
||||
<p>If you return a dictionary, the variables defined in the dictionery are visible to the view (template).
|
||||
<p>If you return a dictionary, the variables defined in the dictionary are visible to the view (template).
|
||||
<br/>Try it here: <a class="btn" href="/{{=request.application}}/simple_examples/hello3.html">hello3</a></p>
|
||||
|
||||
<p>Actions can also be be rendered in other formsts like JSON, <a href="/{{=request.application}}/simple_examples/hello3.json">hello3.json</a>, and XML, <a href="/{{=request.application}}/simple_examples/hello3.xml">hello3.xml</a></p>
|
||||
<p>Actions can also be be rendered in other formats like JSON, <a href="/{{=request.application}}/simple_examples/hello3.json">hello3.json</a>, and XML, <a href="/{{=request.application}}/simple_examples/hello3.xml">hello3.xml</a></p>
|
||||
|
||||
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
|
||||
{{=CODE("""
|
||||
@@ -69,7 +69,7 @@ def hello4():
|
||||
def hello5():
|
||||
return HTML(BODY(H1(T('Hello World'),_style="color: red;"))).xml() # .xml to serialize
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}
|
||||
<p>You can also generate HTML using helper objects HTML, BODY, H1, etc. Each of these tags is a class and the views know how to render the corresponding objects. The method .xml() serializes them and produce html/xml code for the page.
|
||||
<p>You can also generate HTML using helper objects HTML, BODY, H1, etc. Each of these tags is a class and the views know how to render the corresponding objects. The method .xml() serializes them and produces html/xml code for the page.
|
||||
Each tag, DIV for example, takes three types of arguments:</p>
|
||||
<ul>
|
||||
<li>unnamed arguments, they correspond to nested tags</li>
|
||||
@@ -201,11 +201,11 @@ def ajaxwiki_onclick():
|
||||
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: session_examples.py </b>
|
||||
{{=CODE("""
|
||||
def counter():
|
||||
session.counter = (sesstion.counter or 0) + 1
|
||||
session.counter = (session.counter or 0) + 1
|
||||
return dict(counter=session.counter)
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}<b>and view: session_examples/counter.html</b>
|
||||
{{=CODE(open(os.path.join(request.folder,'views/session_examples/counter.html'),'r').read(),language='html',link=URL('global','vars'),_class='boxCode')}}
|
||||
<p>Click to count. The session.counter is persistent for this user and application. Every applicaiton within the system has its own separate session management.
|
||||
<p>Click to count. The session.counter is persistent for this user and application. Every application within the system has its own separate session management.
|
||||
<br/>Try it here: <a class="btn" href="/{{=request.application}}/session_examples/counter">counter</a></p>
|
||||
|
||||
<h2 id="template_examples">Template Examples</h2>
|
||||
@@ -390,7 +390,7 @@ db.purchase.quantity.requires = IS_INT_IN_RANGE(0, 10)
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}
|
||||
<p>
|
||||
Tables are created if they do not exist (try... except).
|
||||
Here "purchased" is an Query object, "db(purchased)" would be a Set objects. A Set object can be selected, updated, deleted. Sets can also be intersected. Allowed field types are string, integer, password, text, blob, upload, date, time, datetime, references(*), and id(*). The id field is there by default and must not be declared. references are for one to many and many to many as in the example above. For strings you should specify a length or you get length=32.<br/><br/>
|
||||
Here "purchased" is an Query object, "db(purchased)" would be a Set objects. A Set object can be selected, updated, deleted. Sets can also be intersected. Allowed field types are string, integer, password, text, blob, upload, date, time, datetime, references(*), and id(*). The id field is there by default and must not be declared. References are for one to many and many to many as in the example above. For strings you should specify a length or you get length=32.<br/><br/>
|
||||
You can use db.tablename.fieldname.requires= to set restrictions on the field values. These restrictions are automatically converted into widgets when generating forms from the table with SQLFORM(db.tablename).
|
||||
<br/><br/>
|
||||
define_tables creates the table and attempts a migration if table has changed or if database name has changed since last time. If you know you already have the table in the database and you do not want to attempt a migration add one last argument to define_table <tt>migrate=False</tt>.</p>
|
||||
@@ -443,7 +443,7 @@ def buy():
|
||||
Field('product_id',requires=IS_IN_DB(db,db.product.id,'%(name)s')),
|
||||
Field('quantity','integer',requires=IS_INT_IN_RANGE(1,100))).process()
|
||||
if form.accepted:
|
||||
# get previous purchese for same product
|
||||
# get previous purchase for same product
|
||||
purchase = db((db.purchase.buyer_id == form.vars.buyer_id)&
|
||||
(db.purchase.product_id==form.vars.product_id)).select().first()
|
||||
|
||||
@@ -551,7 +551,7 @@ def cache_controller_and_view():
|
||||
d=dict(time=t,link=A('click to reload',_href=URL(r=request)))
|
||||
return response.render(d)
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}
|
||||
<p><tt>response.render(d)</tt> renders the dictionary inside the controller, so everything is cached now for 5 seconds. This is best and fastest way of caching!
|
||||
<p><tt>response.render(d)</tt> renders the dictionary inside the controller, so everything is cached now for 5 seconds. This is the best and fastest way of caching!
|
||||
<br/>Try it here: <a class="btn" href="/{{=request.application}}/cache_examples/cache_controller_and_view">cache_controller_and_view</a></p>
|
||||
|
||||
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: cache_examples.py </b>
|
||||
@@ -633,14 +633,14 @@ def streamer():
|
||||
path=os.path.join(request.folder,'private','largefile.mpeg4')
|
||||
return response.stream(open(path,'rb'),chunk_size=4096)
|
||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}
|
||||
<p>By default all static files and files stored in 'upload' fields in the database are streamed when larger than 1MByte.</p>
|
||||
<p>By default all static files and files stored in 'upload' fields in the database are streamed when larger than 1 MByte.</p>
|
||||
|
||||
</p>web2py automatically and transparently handles PARTIAL_CONTENT and RANGE requests.</p>
|
||||
|
||||
<h2 id="xmlrpc_examples">XML-RPC Examples</h2>
|
||||
|
||||
<h3>Example {{=c}}{{c+=1}}</h3>
|
||||
<p>Web2py has native support for the XMLRPC protocol. Below is a controller function "handler" that exposes two functions, "add" and "sub" via XMLRPC. The controller "tester" executes the two function remotely via xmlrpc.</p>
|
||||
<p>Web2py has native support for the XMLRPC protocol. Below is a controller function "handler" that exposes two functions, "add" and "sub" via XMLRPC. The controller "tester" executes the two functions remotely via xmlrpc.</p>
|
||||
{{=CODE("""
|
||||
from gluon.tools import Service
|
||||
service = Service(globals())
|
||||
|
||||
@@ -15,14 +15,13 @@
|
||||
<p>For professional support, you can also contact one of the companies below:</p>
|
||||
|
||||
<ul>
|
||||
<li><a target="_blank" href="http://experts4solutions.com">Experts4Soutions</a> (worldwide)</li>
|
||||
<li><a target="_blank" href="http://experts4solutions.com">Experts4Solutions</a> (worldwide)</li>
|
||||
<li><a target="_blank" href="http://www.planethost.com">PlanetHost</a> (USA)</li>
|
||||
<li><a target="_blank" href="http://www.corebyte.nl">Corebyte</a> (Netherlands)</li>
|
||||
<li><a target="_blank" href="http://www.dutveul.nl">Dutveul</a> (Netherlands)</li>
|
||||
<li><a target="_blank" href="http://www.onemewebservices.com">OneMeWebServices</a> (Canada)</li>
|
||||
<li><a target="_blank" href="http://www.budgetbytes.nl">BudgetBytes</a> (The Netherlands)</li>
|
||||
<li><a target="_blank" href="http://www.androsoft.pl">ANDROSoft</a> (Poland)</li>
|
||||
<li><a target="_blank" href="http://www.sonnetech.com.br">Sonne Tech</a> (Brazil)</li>
|
||||
<li><a target="_blank" href="http://www.nrg.com.br">NRG Internet Solutions</a> (Brazil)</li>
|
||||
<li><a target="_blank" href="http://itjp.net.br/">ITJP</a> (Brazil)</li>
|
||||
<li><a target="_blank" href="http://i-am.pt">I am Consultoria</a> (Portugal)</li>
|
||||
@@ -33,7 +32,6 @@
|
||||
<li><a target="_blank" href="http://www.appliedobjects.com">Applied Objects</a> (New Zealand)</li>
|
||||
<li><a target="_blank" href="http://www.sistemasagiles.com.ar/">Sistemas Ágiles</a> ("Agile Systems") (Argentina)</li>
|
||||
<li><a target="_blank" href="http://www.tasko.it/">Tasko</a> (Italy)</li>
|
||||
<li><a target="_blank" href="http://www.geekondemand.it/"> GeekOnDemand</a> (Italy)</li>
|
||||
<li><a target="_blank" href="http://stifix.com"> Stifix</a> (Indonesia)</li>
|
||||
<li><a target="_blank" href="http://www.garciac.es"> Garciac</a> (Spain)</li>
|
||||
<li><a target="_blank" href="http://memoriapersistente.pt "> Memoria persistente</a> (Portugal)</li>
|
||||
|
||||
@@ -149,12 +149,13 @@
|
||||
|
||||
<li><a href="http://www.python.org">Python</a> created by Guido van Rossum.</li>
|
||||
<li>Rocket Web Server developed by Timothy Farrell.</li>
|
||||
<li><a href="http://codemirror.net/">CodeMirror</a></li>s
|
||||
<li><a href="http://codemirror.net/">CodeMirror</a></li>
|
||||
|
||||
<li><a href="http://pyrtf.sourceforge.net/">PyRTF</a> developed by Simon Cusack and revised by Grant Edwards</li>
|
||||
<li><a href="http://www.dalkescientific.com/Python/PyRSS2Gen.html">PyRSS2Gen</a> developed by Dalke Scientific Software</li>
|
||||
<li><a href="http://www.feedparser.org/">feedparser</a> developed by Mark Pilgrim</li>
|
||||
<li><a href="http://code.google.com/p/python-markdown2/">markdown2</a> developed by Trent Mick</li>
|
||||
<li><a href="http://svn.saddi.com/py-lib/trunk/fcgi.py">fcgi.py</a> devloped by Allan Saddi (for production Lighttpd servers)</li>
|
||||
<li><a href="http://svn.saddi.com/py-lib/trunk/fcgi.py">fcgi.py</a> developed by Allan Saddi (for production Lighttpd servers)</li>
|
||||
<li><a href="http://www.danga.com/memcached/">memcache</a> developed by Evan Martin</li>
|
||||
<li><a href="http://jquery.com/">jQuery</a> developed by John Resig</li>
|
||||
<li>A syntax highlighter inspired by the code of <a href="http://www.petersblog.org/node/763">Peter Wilkinson</a></li>
|
||||
|
||||
@@ -224,15 +224,15 @@ def select():
|
||||
session.last_orderby = orderby
|
||||
session.last_query = request.vars.query
|
||||
form = FORM(TABLE(TR(T('Query:'), '', INPUT(_style='width:400px',
|
||||
_name='query', _value=request.vars.query or '',
|
||||
_name='query', _value=request.vars.query or '', _class="form-control",
|
||||
requires=IS_NOT_EMPTY(
|
||||
error_message=T("Cannot be empty")))), TR(T('Update:'),
|
||||
INPUT(_name='update_check', _type='checkbox',
|
||||
value=False), INPUT(_style='width:400px',
|
||||
_name='update_fields', _value=request.vars.update_fields
|
||||
or '')), TR(T('Delete:'), INPUT(_name='delete_check',
|
||||
or '', _class="form-control")), TR(T('Delete:'), INPUT(_name='delete_check',
|
||||
_class='delete', _type='checkbox', value=False), ''),
|
||||
TR('', '', INPUT(_type='submit', _value=T('submit')))),
|
||||
TR('', '', INPUT(_type='submit', _value=T('submit'), _class="btn btn-primary"))),
|
||||
_action=URL(r=request, args=request.args))
|
||||
|
||||
tb = None
|
||||
@@ -274,7 +274,7 @@ def select():
|
||||
formcsv = FORM(str(T('or import from csv file')) + " ",
|
||||
INPUT(_type='file', _name='csvfile'),
|
||||
INPUT(_type='hidden', _value=csv_table, _name='table'),
|
||||
INPUT(_type='submit', _value=T('import')))
|
||||
INPUT(_type='submit', _value=T('import'), _class="btn btn-primary"))
|
||||
else:
|
||||
formcsv = None
|
||||
if formcsv and formcsv.process().accepted:
|
||||
@@ -394,10 +394,9 @@ def ccache():
|
||||
redirect(URL(r=request))
|
||||
|
||||
try:
|
||||
from guppy import hpy
|
||||
hp = hpy()
|
||||
from pympler.asizeof import asizeof
|
||||
except ImportError:
|
||||
hp = False
|
||||
asizeof = False
|
||||
|
||||
import shelve
|
||||
import os
|
||||
@@ -451,9 +450,9 @@ def ccache():
|
||||
ram['ratio'] = 0
|
||||
|
||||
for key, value in iteritems(cache.ram.storage):
|
||||
if hp:
|
||||
ram['bytes'] += hp.iso(value[1]).size
|
||||
ram['objects'] += hp.iso(value[1]).count
|
||||
if asizeof:
|
||||
ram['bytes'] += asizeof(value[1])
|
||||
ram['objects'] += 1
|
||||
ram['entries'] += 1
|
||||
if value[0] < ram['oldest']:
|
||||
ram['oldest'] = value[0]
|
||||
@@ -469,9 +468,9 @@ def ccache():
|
||||
except (KeyError, ZeroDivisionError):
|
||||
disk['ratio'] = 0
|
||||
else:
|
||||
if hp:
|
||||
disk['bytes'] += hp.iso(value[1]).size
|
||||
disk['objects'] += hp.iso(value[1]).count
|
||||
if asizeof:
|
||||
disk['bytes'] += asizeof(value[1])
|
||||
disk['objects'] += 1
|
||||
disk['entries'] += 1
|
||||
if value[0] < disk['oldest']:
|
||||
disk['oldest'] = value[0]
|
||||
@@ -511,7 +510,7 @@ def ccache():
|
||||
total['keys'] = key_table(total['keys'])
|
||||
|
||||
return dict(form=form, total=total,
|
||||
ram=ram, disk=disk, object_stats=hp != False)
|
||||
ram=ram, disk=disk, object_stats=asizeof != False)
|
||||
|
||||
|
||||
def table_template(table):
|
||||
@@ -589,7 +588,7 @@ def manage():
|
||||
auth.table_permission().group_id.label = T('Role')
|
||||
auth.table_permission().name.label = T('Permission')
|
||||
if table == auth.table_user():
|
||||
linked_tables=[auth.settings.table_membership_name]
|
||||
linked_tables = [auth.settings.table_membership_name]
|
||||
elif table == auth.table_group():
|
||||
orderby = 'role' if not request.args(3) or '.group_id' not in request.args(3) else None
|
||||
elif table == auth.table_permission():
|
||||
@@ -605,13 +604,13 @@ def manage():
|
||||
def hooks():
|
||||
import functools
|
||||
import inspect
|
||||
list_op=['_%s_%s' %(h,m) for h in ['before', 'after'] for m in ['insert','update','delete']]
|
||||
tables=[]
|
||||
with_build_it=False
|
||||
list_op = ['_%s_%s' %(h,m) for h in ['before', 'after'] for m in ['insert','update','delete']]
|
||||
tables = []
|
||||
with_build_it = False
|
||||
for db_str in sorted(databases):
|
||||
db = databases[db_str]
|
||||
for t in db.tables:
|
||||
method_hooks=[]
|
||||
method_hooks = []
|
||||
for op in list_op:
|
||||
functions = []
|
||||
for f in getattr(db[t], op):
|
||||
@@ -631,16 +630,16 @@ def hooks():
|
||||
except:
|
||||
pass
|
||||
if len(functions):
|
||||
method_hooks.append({'name':op, 'functions':functions})
|
||||
method_hooks.append({'name': op, 'functions':functions})
|
||||
if len(method_hooks):
|
||||
tables.append({'name':"%s.%s" % (db_str,t), 'slug': IS_SLUG()("%s.%s" % (db_str,t))[0], 'method_hooks':method_hooks})
|
||||
tables.append({'name': "%s.%s" % (db_str, t), 'slug': IS_SLUG()("%s.%s" % (db_str,t))[0], 'method_hooks':method_hooks})
|
||||
# Render
|
||||
ul_main = UL(_class='nav nav-list')
|
||||
for t in tables:
|
||||
ul_main.append(A(t['name'], _onclick="collapse('a_%s')" % t['slug']))
|
||||
ul_t = UL(_class='nav nav-list', _id="a_%s" % t['slug'], _style='display:none')
|
||||
for op in t['method_hooks']:
|
||||
ul_t.append(LI (op['name']))
|
||||
ul_t.append(LI(op['name']))
|
||||
ul_t.append(UL([LI(A(f['funcname'], _class="editor_filelink", _href=f['url']if 'url' in f else None, **{'_data-lineno':f['lineno']-1})) for f in op['functions']]))
|
||||
ul_main.append(ul_t)
|
||||
return ul_main
|
||||
@@ -653,41 +652,40 @@ def hooks():
|
||||
def d3_graph_model():
|
||||
""" See https://www.facebook.com/web2py/posts/145613995589010 from Bruno Rocha
|
||||
and also the app_admin bg_graph_model function
|
||||
|
||||
|
||||
Create a list of table dicts, called "nodes"
|
||||
"""
|
||||
|
||||
data = {}
|
||||
|
||||
nodes = []
|
||||
links = []
|
||||
|
||||
subgraphs = dict()
|
||||
for database in databases:
|
||||
db = eval_in_global_env(database)
|
||||
for tablename in db.tables:
|
||||
fields = []
|
||||
for field in db[tablename]:
|
||||
f_type = field.type
|
||||
if not isinstance(f_type, str):
|
||||
disp = ' '
|
||||
elif f_type == 'string':
|
||||
disp = field.length
|
||||
elif f_type == 'id':
|
||||
disp = "PK"
|
||||
elif f_type.startswith('reference') or \
|
||||
f_type.startswith('list:reference'):
|
||||
disp = "FK"
|
||||
else:
|
||||
disp = ' '
|
||||
fields.append(dict(name=field.name, type=field.type, disp=disp))
|
||||
|
||||
for tablename in db.tables:
|
||||
fields = []
|
||||
for field in db[tablename]:
|
||||
f_type = field.type
|
||||
if not isinstance(f_type,str):
|
||||
disp = ' '
|
||||
elif f_type == 'string':
|
||||
disp = field.length
|
||||
elif f_type == 'id':
|
||||
disp = "PK"
|
||||
elif f_type.startswith('reference') or \
|
||||
f_type.startswith('list:reference'):
|
||||
disp = "FK"
|
||||
else:
|
||||
disp = ' '
|
||||
fields.append(dict(name= field.name, type=field.type, disp = disp))
|
||||
if isinstance(f_type, str) and (
|
||||
f_type.startswith('reference') or
|
||||
f_type.startswith('list:reference')):
|
||||
referenced_table = f_type.split()[1].split('.')[0]
|
||||
|
||||
if isinstance(f_type,str) and (
|
||||
f_type.startswith('reference') or
|
||||
f_type.startswith('list:reference')):
|
||||
referenced_table = f_type.split()[1].split('.')[0]
|
||||
links.append(dict(source=tablename, target = referenced_table))
|
||||
|
||||
links.append(dict(source=tablename, target = referenced_table))
|
||||
|
||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||
|
||||
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
||||
response.files.append(URL('admin','static','js/d3.min.js'))
|
||||
|
||||
@@ -1,26 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# this file is released under public domain and you can use without limitations
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# This is a sample controller
|
||||
# - index is the default action of any application
|
||||
# - user is required for authentication and authorization
|
||||
# - download is for downloading files uploaded in the db (does streaming)
|
||||
# this file is released under public domain and you can use without limitations
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
|
||||
# ---- example index page ----
|
||||
def index():
|
||||
"""
|
||||
example action using the internationalization operator T and flash
|
||||
rendered by views/default/index.html or views/generic.html
|
||||
|
||||
if you need a simple wiki simply replace the two lines below with:
|
||||
return auth.wiki()
|
||||
"""
|
||||
response.flash = T("Hello World")
|
||||
return dict(message=T('Welcome to web2py!'))
|
||||
|
||||
# ---- API (example) -----
|
||||
@auth.requires_login()
|
||||
def api_get_user_email():
|
||||
if not request.env.request_method == 'GET': raise HTTP(403)
|
||||
return response.json({'status':'success', 'email':auth.user.email})
|
||||
|
||||
# ---- Smart Grid (example) -----
|
||||
@auth.requires_membership('admin') # can only be accessed by members of admin groupd
|
||||
def grid():
|
||||
response.view = 'generic.html' # use a generic view
|
||||
tablename = request.args(0)
|
||||
if not tablename in db.tables: raise HTTP(403)
|
||||
grid = SQLFORM.smartgrid(db[tablename], args=[tablename], deletable=False, editable=False)
|
||||
return dict(grid=grid)
|
||||
|
||||
# ---- Embedded wiki (example) ----
|
||||
def wiki():
|
||||
auth.wikimenu() # add the wiki to the menu
|
||||
return auth.wiki()
|
||||
|
||||
# ---- Action for login/register/etc (required for auth) -----
|
||||
def user():
|
||||
"""
|
||||
exposes:
|
||||
@@ -39,7 +48,7 @@ def user():
|
||||
"""
|
||||
return dict(form=auth())
|
||||
|
||||
|
||||
# ---- action to server uploaded static content (required) ---
|
||||
@cache.action()
|
||||
def download():
|
||||
"""
|
||||
@@ -47,15 +56,3 @@ def download():
|
||||
http://..../[app]/default/download/[filename]
|
||||
"""
|
||||
return response.download(request, db)
|
||||
|
||||
|
||||
def call():
|
||||
"""
|
||||
exposes services. for example:
|
||||
http://..../[app]/default/call/jsonrpc
|
||||
decorate with @services.jsonrpc the functions to expose
|
||||
supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv
|
||||
"""
|
||||
return service()
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
'%s %%{row} deleted': '%s %%{fila} %%{eliminada}',
|
||||
'%s %%{row} updated': '%s %%{fila} %%{actualizada}',
|
||||
'%s selected': '%s %%{seleccionado}',
|
||||
'%Y-%m-%d': '%d/%m/%A',
|
||||
'%Y-%m-%d %H:%M:%S': '%d/%m/%A %H:%M:%S',
|
||||
'%Y-%m-%d': '%d/%m/%Y',
|
||||
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
|
||||
'(**%.0d MB**)': '(**%.0d MB**)',
|
||||
'(something like "it-it")': '(algo como "it-it")',
|
||||
'**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}': '**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}',
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
'An error occured, please %s the page': 'È stato rilevato un errore, prego %s la pagina',
|
||||
'An error occured, please [[reload %s]] the page': 'An error occured, please [[reload %s]] the page',
|
||||
'And': 'E',
|
||||
'API Example': 'API Example',
|
||||
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
|
||||
'Are you sure you want to delete this object?': 'Sicuro di voler cancellare questo oggetto ?',
|
||||
'Available Databases and Tables': 'Database e tabelle disponibili',
|
||||
@@ -99,6 +100,7 @@
|
||||
'Email and SMS': 'Email e SMS',
|
||||
'Email non valida': 'Email non valida',
|
||||
'enter a number between %(min)g and %(max)g': 'enter a number between %(min)g and %(max)g',
|
||||
'Enter an integer between %(min)g and %(max)g': 'Enter an integer between %(min)g and %(max)g',
|
||||
'enter an integer between %(min)g and %(max)g': 'inserisci un intero tra %(min)g e %(max)g',
|
||||
'Errors': 'Errori',
|
||||
'Errors in form, please check it out.': 'Errori nel form, ricontrollalo',
|
||||
@@ -110,6 +112,7 @@
|
||||
'Forms and Validators': 'Forms and Validators',
|
||||
'Free Applications': 'Free Applications',
|
||||
'Graph Model': 'Graph Model',
|
||||
'Grid Example': 'Grid Example',
|
||||
'Group %(group_id)s created': 'Group %(group_id)s created',
|
||||
'Group ID': 'ID Gruppo',
|
||||
'Group uniquely assigned to user %(id)s': 'Group uniquely assigned to user %(id)s',
|
||||
@@ -226,6 +229,7 @@
|
||||
'Semantic': 'Semantic',
|
||||
'Services': 'Servizi',
|
||||
'Sign Up': 'Sign Up',
|
||||
'Sign up': 'Sign up',
|
||||
'Size of cache:': 'Size of cache:',
|
||||
'starts with': 'comincia con',
|
||||
'state': 'stato',
|
||||
@@ -273,6 +277,7 @@
|
||||
'Welcome to web2py': 'Benvenuto su web2py',
|
||||
'Welcome to web2py!': 'Benvenuto in web2py!',
|
||||
'Which called the function %s located in the file %s': 'che ha chiamato la funzione %s presente nel file %s',
|
||||
'Wiki Example': 'Wiki Example',
|
||||
'Working...': 'Working...',
|
||||
'XML': 'XML',
|
||||
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'выбрана': ['\\xd0\\xb2\\xd1\\x8b\\xd0\\xb1\\xd1\\x80\\xd0\\xb0\\xd0\\xbd\\xd1\\x8b', '\\xd0\\xb2\\xd1\\x8b\\xd0\\xb1\\xd1\\x80\\xd0\\xb0\\xd0\\xbd\\xd0\\xbe'],
|
||||
'год': ['\\xd0\\xb3\\xd0\\xbe\\xd0\\xb4\\xd0\\xb0', '\\xd0\\xbb\\xd0\\xb5\\xd1\\x82'],
|
||||
'день': ['\\xd0\\xb4\\xd0\\xbd\\xd1\\x8f', '\\xd0\\xb4\\xd0\\xbd\\xd0\\xb5\\xd0\\xb9'],
|
||||
'запись': ['\\xd0\\xb7\\xd0\\xb0\\xd0\\xbf\\xd0\\xb8\\xd1\\x81\\xd0\\xb8', '\\xd0\\xb7\\xd0\\xb0\\xd0\\xbf\\xd0\\xb8\\xd1\\x81\\xd0\\xb5\\xd0\\xb9'],
|
||||
'изменена': ['\\xd0\\xb8\\xd0\\xb7\\xd0\\xbc\\xd0\\xb5\\xd0\\xbd\\xd0\\xb5\\xd0\\xbd\\xd1\\x8b', '\\xd0\\xb8\\xd0\\xb7\\xd0\\xbc\\xd0\\xb5\\xd0\\xbd\\xd0\\xb5\\xd0\\xbd\\xd0\\xbe'],
|
||||
'месяц': ['\\xd0\\xbc\\xd0\\xb5\\xd1\\x81\\xd1\\x8f\\xd1\\x86\\xd0\\xb0', '\\xd0\\xbc\\xd0\\xb5\\xd1\\x81\\xd1\\x8f\\xd1\\x86\\xd0\\xb5\\xd0\\xb2'],
|
||||
'минуту': ['\\xd0\\xbc\\xd0\\xb8\\xd0\\xbd\\xd1\\x83\\xd1\\x82\\xd1\\x8b', '\\xd0\\xbc\\xd0\\xb8\\xd0\\xbd\\xd1\\x83\\xd1\\x82'],
|
||||
'неделю': ['\\xd0\\xbd\\xd0\\xb5\\xd0\\xb4\\xd0\\xb5\\xd0\\xbb\\xd0\\xb8', '\\xd0\\xbd\\xd0\\xb5\\xd0\\xb4\\xd0\\xb5\\xd0\\xbb\\xd1\\x8c'],
|
||||
'секунду': ['\\xd1\\x81\\xd0\\xb5\\xd0\\xba\\xd1\\x83\\xd0\\xbd\\xd0\\xb4\\xd1\\x8b', '\\xd1\\x81\\xd0\\xb5\\xd0\\xba\\xd1\\x83\\xd0\\xbd\\xd0\\xb4'],
|
||||
'строка': ['\\xd1\\x81\\xd1\\x82\\xd1\\x80\\xd0\\xbe\\xd0\\xba\\xd0\\xb8', '\\xd1\\x81\\xd1\\x82\\xd1\\x80\\xd0\\xbe\\xd0\\xba'],
|
||||
'удалена': ['\\xd1\\x83\\xd0\\xb4\\xd0\\xb0\\xd0\\xbb\\xd0\\xb5\\xd0\\xbd\\xd1\\x8b', '\\xd1\\x83\\xd0\\xb4\\xd0\\xb0\\xd0\\xbb\\xd0\\xb5\\xd0\\xbd\\xd0\\xbe'],
|
||||
'час': ['\\xd1\\x87\\xd0\\xb0\\xd1\\x81\\xd0\\xb0', '\\xd1\\x87\\xd0\\xb0\\xd1\\x81\\xd0\\xbe\\xd0\\xb2'],
|
||||
'выбрана': ['выбраны','выбрано'],
|
||||
'год': ['года','лет'],
|
||||
'день': ['дня', 'дней'],
|
||||
'запись': ['записи','записей'],
|
||||
'изменена': ['изменены','изменено'],
|
||||
'месяц': ['месяца','месяцев'],
|
||||
'минуту': ['минуты','минут'],
|
||||
'неделю': ['недели','недель'],
|
||||
'секунду': ['секунды','секунд'],
|
||||
'строка': ['строки','строк'],
|
||||
'удалена': ['удалены','удалено'],
|
||||
'час': ['часа','часов'],
|
||||
}
|
||||
|
||||
@@ -13,14 +13,17 @@
|
||||
'**%(items)s** items, **%(bytes)s** %%{byte(bytes)}': '**%(items)s** items, **%(bytes)s** %%{byte(bytes)}',
|
||||
'**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)': '**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)',
|
||||
'?': '?',
|
||||
'@markmin\x01An error occured, please [[reload %s]] the page': 'An error occured, please [[reload %s]] the page',
|
||||
'@markmin\x01Number of entries: **%s**': 'Number of entries: **%s**',
|
||||
'``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)': '``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)',
|
||||
'About': 'About',
|
||||
'About': 'Sobre',
|
||||
'Access Control': 'Controle de acesso',
|
||||
'admin': 'administrador',
|
||||
'Administrative Interface': 'Interface Administrativa',
|
||||
'Administrative interface': 'Painel Administrativo',
|
||||
'Ajax Recipes': 'Formulas Ajax',
|
||||
'An error occured, please [[reload %s]] the page': 'Ocorreu um erro, por favor [[recarregue %s]] a página',
|
||||
'API Example': 'API Example',
|
||||
'appadmin is disabled because insecure channel': 'appadmin está desactivada pois o canal é inseguro',
|
||||
'Are you sure you want to delete this object?': 'Tem a certeza que quer deletar este objeto?',
|
||||
'Author Reference Auth User': 'Author Reference Auth User',
|
||||
@@ -73,27 +76,31 @@
|
||||
'Disk Cache Keys': 'Disk Cache Keys',
|
||||
'Disk Cleared': 'Disk Cleared',
|
||||
'DISK contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.': 'DISK contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.',
|
||||
'Documentation': 'Documentation',
|
||||
"Don't know what to do?": "Don't know what to do?",
|
||||
'Documentation': 'Documentação',
|
||||
"Don't know what to do?": 'Não sabe o que fazer?',
|
||||
'done!': 'concluído!',
|
||||
'Download': 'Download',
|
||||
'E-mail': 'E-mail',
|
||||
'Edit': 'Editar',
|
||||
'edit category': 'edit category',
|
||||
'edit comment': 'edit comment',
|
||||
'edit category': 'editar categoria',
|
||||
'edit comment': 'editar comentário',
|
||||
'Edit current record': 'Edição de registo currente',
|
||||
'edit post': 'edit post',
|
||||
'edit post': 'editar post',
|
||||
'edit profile': 'Editar perfil',
|
||||
'Edit This App': 'Edite esta aplicação',
|
||||
'Email': 'Email',
|
||||
'Email and SMS': 'Email and SMS',
|
||||
'Errors': 'Errors',
|
||||
'Email and SMS': 'Email e SMS',
|
||||
'Enter an integer between %(min)g and %(max)g': 'Enter an integer between %(min)g and %(max)g',
|
||||
'Errors': 'Erros',
|
||||
'export as csv file': 'exportar como ficheiro csv',
|
||||
'FAQ': 'FAQ',
|
||||
'First name': 'First name',
|
||||
'First Name': 'First Name',
|
||||
'For %s #%s': 'For %s #%s',
|
||||
'Forms and Validators': 'Forms and Validators',
|
||||
'Free Applications': 'Free Applications',
|
||||
'Graph Model': 'Graph Model',
|
||||
'Grid Example': 'Grid Example',
|
||||
'Groups': 'Groups',
|
||||
'Hello World': 'Olá Mundo',
|
||||
'Helping web2py': 'Helping web2py',
|
||||
@@ -106,10 +113,11 @@
|
||||
'insert new': 'inserir novo',
|
||||
'insert new %s': 'inserir novo %s',
|
||||
'Internal State': 'Estado interno',
|
||||
'Introduction': 'Introduction',
|
||||
'Introduction': 'Introdução',
|
||||
'Invalid Query': 'Consulta Inválida',
|
||||
'invalid request': 'Pedido Inválido',
|
||||
'Key': 'Key',
|
||||
'Last name': 'Last name',
|
||||
'Last Name': 'Last Name',
|
||||
'Layout': 'Esboço',
|
||||
'Layout Plugins': 'Layout Plugins',
|
||||
@@ -117,8 +125,9 @@
|
||||
'Live Chat': 'Live Chat',
|
||||
'Log In': 'Log In',
|
||||
'login': 'login',
|
||||
'Login': 'Login',
|
||||
'logout': 'logout',
|
||||
'Lost Password': 'Lost Password',
|
||||
'Lost Password': 'Perdeu a Senha',
|
||||
'Main Menu': 'Menu Principal',
|
||||
'Manage %(action)s': 'Manage %(action)s',
|
||||
'Manage Access Control': 'Manage Access Control',
|
||||
@@ -128,7 +137,7 @@
|
||||
'Modified By': 'Modified By',
|
||||
'Modified On': 'Modified On',
|
||||
'My Sites': 'My Sites',
|
||||
'Name': 'Name',
|
||||
'Name': 'Nome',
|
||||
'New Record': 'Novo Registo',
|
||||
'new record inserted': 'novo registo inserido',
|
||||
'next %s rows': 'next %s rows',
|
||||
@@ -136,7 +145,7 @@
|
||||
'No Data': 'No Data',
|
||||
'No databases in this application': 'Não há bases de dados nesta aplicação',
|
||||
'Number of entries: **%s**': 'Number of entries: **%s**',
|
||||
'Online book': 'Online book',
|
||||
'Online book': 'Livro Online',
|
||||
'Online examples': 'Exemplos online',
|
||||
'or import from csv file': 'ou importe a partir de ficheiro csv',
|
||||
'Other Plugins': 'Other Plugins',
|
||||
@@ -160,13 +169,17 @@
|
||||
'RAM Cache Keys': 'RAM Cache Keys',
|
||||
'Ram Cleared': 'Ram Cleared',
|
||||
'RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.': 'RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.',
|
||||
'Recipes': 'Recipes',
|
||||
'Recipes': 'Receitas',
|
||||
'Record': 'registo',
|
||||
'record does not exist': 'registo inexistente',
|
||||
'Record id': 'id de registo',
|
||||
'Register': 'Register',
|
||||
'register': 'register',
|
||||
'Register': 'Registar',
|
||||
'register': 'registar',
|
||||
'Registration identifier': 'Registration identifier',
|
||||
'Registration key': 'Registration key',
|
||||
'Remember me (for 30 days)': 'Lembrar de mim (por 30 dias)',
|
||||
'Replyto Reference Post': 'Replyto Reference Post',
|
||||
'Reset Password key': 'Reset Password key',
|
||||
'Role': 'Role',
|
||||
'Roles': 'Roles',
|
||||
'Rows in Table': 'Linhas numa tabela',
|
||||
@@ -183,12 +196,14 @@
|
||||
'show category': 'show category',
|
||||
'show comment': 'show comment',
|
||||
'show post': 'show post',
|
||||
'Sign Up': 'Sign Up',
|
||||
'Sign Up': 'Registar-se',
|
||||
'Sign up': 'Registar-se',
|
||||
'Size of cache:': 'Size of cache:',
|
||||
'state': 'estado',
|
||||
'Statistics': 'Statistics',
|
||||
'Stylesheet': 'Folha de estilo',
|
||||
'submit': 'submit',
|
||||
'submit': 'submeter',
|
||||
'Submit': 'Submit',
|
||||
'Support': 'Support',
|
||||
'Sure you want to delete this object?': 'Tem a certeza que deseja eliminar este objecto?',
|
||||
'Table': 'tabela',
|
||||
@@ -212,9 +227,10 @@
|
||||
'Welcome %s': 'Bem-vindo(a) %s',
|
||||
'Welcome to Gluonization': 'Bem vindo ao Web2py',
|
||||
'Welcome to web2py': 'Bem-vindo(a) ao web2py',
|
||||
'Welcome to web2py!': 'Welcome to web2py!',
|
||||
'Welcome to web2py!': 'Bem-vindo(a) ao web2py!',
|
||||
'When': 'When',
|
||||
'Which called the function %s located in the file %s': 'Which called the function %s located in the file %s',
|
||||
'Wiki Example': 'Wiki Example',
|
||||
'Working...': 'Working...',
|
||||
'You are successfully running web2py': 'You are successfully running web2py',
|
||||
'You can modify this application and adapt it to your needs': 'You can modify this application and adapt it to your needs',
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# AppConfig configuration made easy. Look inside private/appconfig.ini
|
||||
# Auth is for authenticaiton and access control
|
||||
# -------------------------------------------------------------------------
|
||||
from gluon.contrib.appconfig import AppConfig
|
||||
from gluon.tools import Auth
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# This scaffolding model makes your app work on Google App Engine too
|
||||
# File is released under public domain and you can use without limitations
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
if request.global_settings.web2py_version < "2.14.1":
|
||||
raise HTTP(500, "Requires web2py 2.13.3 or newer")
|
||||
if request.global_settings.web2py_version < "2.15.5":
|
||||
raise HTTP(500, "Requires web2py 2.15.5 or newer")
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# if SSL/HTTPS is properly configured and you want all HTTP requests to
|
||||
@@ -14,23 +21,18 @@ if request.global_settings.web2py_version < "2.14.1":
|
||||
# -------------------------------------------------------------------------
|
||||
# request.requires_https()
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# app configuration made easy. Look inside private/appconfig.ini
|
||||
# -------------------------------------------------------------------------
|
||||
from gluon.contrib.appconfig import AppConfig
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# once in production, remove reload=True to gain full speed
|
||||
# -------------------------------------------------------------------------
|
||||
myconf = AppConfig(reload=True)
|
||||
configuration = AppConfig(reload=True)
|
||||
|
||||
if not request.env.web2py_runtime_gae:
|
||||
# ---------------------------------------------------------------------
|
||||
# if NOT running on Google App Engine use SQLite or other DB
|
||||
# ---------------------------------------------------------------------
|
||||
db = DAL(myconf.get('db.uri'),
|
||||
pool_size=myconf.get('db.pool_size'),
|
||||
migrate_enabled=myconf.get('db.migrate'),
|
||||
db = DAL(configuration.get('db.uri'),
|
||||
pool_size=configuration.get('db.pool_size'),
|
||||
migrate_enabled=configuration.get('db.migrate'),
|
||||
check_reserved=['all'])
|
||||
else:
|
||||
# ---------------------------------------------------------------------
|
||||
@@ -52,12 +54,15 @@ else:
|
||||
# by default give a view/generic.extension to all actions from localhost
|
||||
# none otherwise. a pattern can be 'controller/function.extension'
|
||||
# -------------------------------------------------------------------------
|
||||
response.generic_patterns = ['*'] if request.is_local else []
|
||||
response.generic_patterns = []
|
||||
if request.is_local and not configuration.get('app.production'):
|
||||
response.generic_patterns.append('*')
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# choose a style for forms
|
||||
# -------------------------------------------------------------------------
|
||||
response.formstyle = myconf.get('forms.formstyle') # or 'bootstrap3_stacked' or 'bootstrap2' or other
|
||||
response.form_label_separator = myconf.get('forms.separator') or ''
|
||||
response.formstyle = 'bootstrap4_inline'
|
||||
response.form_label_separator = ''
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# (optional) optimize handling of static files
|
||||
@@ -80,27 +85,24 @@ response.form_label_separator = myconf.get('forms.separator') or ''
|
||||
# (more options discussed in gluon/tools.py)
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
from gluon.tools import Auth, Service, PluginManager
|
||||
|
||||
# host names must be a list of allowed host names (glob syntax allowed)
|
||||
auth = Auth(db, host_names=myconf.get('host.names'))
|
||||
service = Service()
|
||||
plugins = PluginManager()
|
||||
auth = Auth(db, host_names=configuration.get('host.names'))
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# create all tables needed by auth if not custom tables
|
||||
# create all tables needed by auth, maybe add a list of extra fields
|
||||
# -------------------------------------------------------------------------
|
||||
auth.settings.extra_fields['auth_user'] = []
|
||||
auth.define_tables(username=False, signature=False)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# configure email
|
||||
# -------------------------------------------------------------------------
|
||||
mail = auth.settings.mailer
|
||||
mail.settings.server = 'logging' if request.is_local else myconf.get('smtp.server')
|
||||
mail.settings.sender = myconf.get('smtp.sender')
|
||||
mail.settings.login = myconf.get('smtp.login')
|
||||
mail.settings.tls = myconf.get('smtp.tls') or False
|
||||
mail.settings.ssl = myconf.get('smtp.ssl') or False
|
||||
mail.settings.server = 'logging' if request.is_local else configuration.get('smtp.server')
|
||||
mail.settings.sender = configuration.get('smtp.sender')
|
||||
mail.settings.login = configuration.get('smtp.login')
|
||||
mail.settings.tls = configuration.get('smtp.tls') or False
|
||||
mail.settings.ssl = configuration.get('smtp.ssl') or False
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# configure auth policy
|
||||
@@ -109,6 +111,27 @@ auth.settings.registration_requires_verification = False
|
||||
auth.settings.registration_requires_approval = False
|
||||
auth.settings.reset_password_requires_verification = True
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# read more at http://dev.w3.org/html5/markup/meta.name.html
|
||||
# -------------------------------------------------------------------------
|
||||
response.meta.author = configuration.get('app.author')
|
||||
response.meta.description = configuration.get('app.description')
|
||||
response.meta.keywords = configuration.get('app.keywords')
|
||||
response.meta.generator = configuration.get('app.generator')
|
||||
response.show_toolbar = configuration.get('app.toolbar')
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# your http://google.com/analytics id
|
||||
# -------------------------------------------------------------------------
|
||||
response.google_analytics_id = configuration.get('google.analytics_id')
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# maybe use the scheduler
|
||||
# -------------------------------------------------------------------------
|
||||
if configuration.get('scheduler.enabled'):
|
||||
from gluon.scheduler import Scheduler
|
||||
scheduler = Scheduler(db, heartbeat=configuration.get('heartbeat'))
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Define your tables below (or better in another model file) for example
|
||||
#
|
||||
|
||||
@@ -1,29 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# this file is released under public domain and you can use without limitations
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
# Customize your APP title, subtitle and menus here
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
response.logo = A(B('web', SPAN(2), 'py'), XML('™ '),
|
||||
_class="navbar-brand", _href="http://www.web2py.com/",
|
||||
_id="web2py-logo")
|
||||
response.title = request.application.replace('_', ' ').title()
|
||||
response.subtitle = ''
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
# read more at http://dev.w3.org/html5/markup/meta.name.html
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
response.meta.author = myconf.get('app.author')
|
||||
response.meta.description = myconf.get('app.description')
|
||||
response.meta.keywords = myconf.get('app.keywords')
|
||||
response.meta.generator = myconf.get('app.generator')
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
# your http://google.com/analytics id
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
response.google_analytics_id = None
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
# this is the main application menu add/remove items as required
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
@@ -32,53 +9,42 @@ response.menu = [
|
||||
(T('Home'), False, URL('default', 'index'), [])
|
||||
]
|
||||
|
||||
DEVELOPMENT_MENU = True
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
# provide shortcuts for development. remove in production
|
||||
# provide shortcuts for development. you can remove everything below in production
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def _():
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
# shortcuts
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
app = request.application
|
||||
ctr = request.controller
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
# useful links to internal and external resources
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
if not configuration.get('app.production'):
|
||||
_app = request.application
|
||||
response.menu += [
|
||||
(T('My Sites'), False, URL('admin', 'default', 'site')),
|
||||
(T('This App'), False, '#', [
|
||||
(T('Design'), False, URL('admin', 'default', 'design/%s' % app)),
|
||||
LI(_class="divider"),
|
||||
(T('Design'), False, URL('admin', 'default', 'design/%s' % _app)),
|
||||
(T('Controller'), False,
|
||||
URL(
|
||||
'admin', 'default', 'edit/%s/controllers/%s.py' % (app, ctr))),
|
||||
'admin', 'default', 'edit/%s/controllers/%s.py' % (_app, request.controller))),
|
||||
(T('View'), False,
|
||||
URL(
|
||||
'admin', 'default', 'edit/%s/views/%s' % (app, response.view))),
|
||||
'admin', 'default', 'edit/%s/views/%s' % (_app, response.view))),
|
||||
(T('DB Model'), False,
|
||||
URL(
|
||||
'admin', 'default', 'edit/%s/models/db.py' % app)),
|
||||
'admin', 'default', 'edit/%s/models/db.py' % _app)),
|
||||
(T('Menu Model'), False,
|
||||
URL(
|
||||
'admin', 'default', 'edit/%s/models/menu.py' % app)),
|
||||
'admin', 'default', 'edit/%s/models/menu.py' % _app)),
|
||||
(T('Config.ini'), False,
|
||||
URL(
|
||||
'admin', 'default', 'edit/%s/private/appconfig.ini' % app)),
|
||||
'admin', 'default', 'edit/%s/private/appconfig.ini' % _app)),
|
||||
(T('Layout'), False,
|
||||
URL(
|
||||
'admin', 'default', 'edit/%s/views/layout.html' % app)),
|
||||
'admin', 'default', 'edit/%s/views/layout.html' % _app)),
|
||||
(T('Stylesheet'), False,
|
||||
URL(
|
||||
'admin', 'default', 'edit/%s/static/css/web2py-bootstrap3.css' % app)),
|
||||
(T('Database'), False, URL(app, 'appadmin', 'index')),
|
||||
'admin', 'default', 'edit/%s/static/css/web2py-bootstrap3.css' % _app)),
|
||||
(T('Database'), False, URL(_app, 'appadmin', 'index')),
|
||||
(T('Errors'), False, URL(
|
||||
'admin', 'default', 'errors/' + app)),
|
||||
'admin', 'default', 'errors/' + _app)),
|
||||
(T('About'), False, URL(
|
||||
'admin', 'default', 'about/' + app)),
|
||||
'admin', 'default', 'about/' + _app)),
|
||||
]),
|
||||
('web2py.com', False, '#', [
|
||||
(T('Download'), False,
|
||||
@@ -98,7 +64,6 @@ def _():
|
||||
]),
|
||||
(T('Documentation'), False, '#', [
|
||||
(T('Online book'), False, 'http://www.web2py.com/book'),
|
||||
LI(_class="divider"),
|
||||
(T('Preface'), False,
|
||||
'http://www.web2py.com/book/default/chapter/00'),
|
||||
(T('Introduction'), False,
|
||||
@@ -143,9 +108,3 @@ def _():
|
||||
]),
|
||||
]
|
||||
|
||||
|
||||
if DEVELOPMENT_MENU:
|
||||
_()
|
||||
|
||||
if "auth" in locals():
|
||||
auth.wikimenu()
|
||||
|
||||
@@ -5,6 +5,8 @@ author = Your Name <you@example.com>
|
||||
description = a cool new app
|
||||
keywords = web2py, python, framework
|
||||
generator = Web2py Web Framework
|
||||
production = false
|
||||
toolbar = false
|
||||
|
||||
; Host configuration
|
||||
[host]
|
||||
@@ -14,7 +16,6 @@ names = localhost:*, 127.0.0.1:*, *:*, *
|
||||
[db]
|
||||
uri = sqlite://storage.sqlite
|
||||
migrate = true
|
||||
; ignored for sqlite
|
||||
pool_size = 10
|
||||
|
||||
; smtp address and credentials
|
||||
@@ -25,7 +26,9 @@ login = username:password
|
||||
tls = true
|
||||
ssl = true
|
||||
|
||||
; form styling
|
||||
[forms]
|
||||
formstyle = bootstrap3_inline
|
||||
separator =
|
||||
[scheduler]
|
||||
enabled = false
|
||||
heartbeat = 1
|
||||
|
||||
[google]
|
||||
analytics_id =
|
||||
@@ -20,8 +20,8 @@
|
||||
# YOU CAN COPY THIS FILE TO ANY APPLICATION'S ROOT DIRECTORY WITHOUT CHANGES!
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
from fileutils import abspath
|
||||
from languages import read_possible_languages
|
||||
from gluon.fileutils import abspath
|
||||
from gluon.languages import read_possible_languages
|
||||
|
||||
possible_languages = read_possible_languages(abspath('applications', app))
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
applications/welcome/static/css/bootstrap.min.css.map
Normal file
1
applications/welcome/static/css/bootstrap.min.css.map
Normal file
File diff suppressed because one or more lines are too long
@@ -1,3 +1,8 @@
|
||||
|
||||
label, th {
|
||||
font-weigth: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.w2p_flash {
|
||||
background-image: none;
|
||||
border-radius: 4px;
|
||||
@@ -99,16 +104,15 @@ select.autocomplete {
|
||||
#web2py-logo:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
.footer > .container-fluid {
|
||||
.footer > .row {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
margin: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.background {
|
||||
background: url(../images/background.jpg) no-repeat center center;
|
||||
}
|
||||
body {
|
||||
padding-top: 60px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
header {
|
||||
@@ -126,8 +130,7 @@ html {
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
background: #333;
|
||||
color: #aaa;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
header h1 {
|
||||
color: #FFF!important;
|
||||
@@ -312,6 +315,36 @@ td.w2p_fc,
|
||||
.web2py_grid table {
|
||||
width: 100%;
|
||||
}
|
||||
input[type=checkbox], input[type=radio] {
|
||||
margin: 4px 4px 0 0;
|
||||
|
||||
/* form submit block */
|
||||
#submit_record__row .btn {
|
||||
margin-bottom: .25rem;
|
||||
}
|
||||
@media (min-width: 577px) {
|
||||
#submit_record__row .btn {
|
||||
margin-left: .25rem;
|
||||
}
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
#submit_record__row .btn {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* for backward compatbility with pre-font-awesome */
|
||||
.icon.plus,.icon.arrowleft,.icon.download,.icon.trash,.icon.pen,.icon.arrowright,.icon.magnifier {
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.icon.plus:before { content: "\f067";}
|
||||
.icon.arrowleft:before { content: "\f060";}
|
||||
.icon.download:before { content: "\f019";}
|
||||
.icon.trash:before { content: "\f1f8";}
|
||||
.icon.pen:before { content: "\f040";}
|
||||
.icon.arrowright:before { content: "\f061";}
|
||||
.icon.magnifier:before { content: "\f002";}
|
||||
Binary file not shown.
@@ -1,288 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata></metadata>
|
||||
<defs>
|
||||
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
|
||||
<font-face units-per-em="1200" ascent="960" descent="-240" />
|
||||
<missing-glyph horiz-adv-x="500" />
|
||||
<glyph horiz-adv-x="0" />
|
||||
<glyph horiz-adv-x="400" />
|
||||
<glyph unicode=" " />
|
||||
<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
|
||||
<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode=" " />
|
||||
<glyph unicode="¥" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
|
||||
<glyph unicode=" " horiz-adv-x="650" />
|
||||
<glyph unicode=" " horiz-adv-x="1300" />
|
||||
<glyph unicode=" " horiz-adv-x="650" />
|
||||
<glyph unicode=" " horiz-adv-x="1300" />
|
||||
<glyph unicode=" " horiz-adv-x="433" />
|
||||
<glyph unicode=" " horiz-adv-x="325" />
|
||||
<glyph unicode=" " horiz-adv-x="216" />
|
||||
<glyph unicode=" " horiz-adv-x="216" />
|
||||
<glyph unicode=" " horiz-adv-x="162" />
|
||||
<glyph unicode=" " horiz-adv-x="260" />
|
||||
<glyph unicode=" " horiz-adv-x="72" />
|
||||
<glyph unicode=" " horiz-adv-x="260" />
|
||||
<glyph unicode=" " horiz-adv-x="325" />
|
||||
<glyph unicode="€" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
|
||||
<glyph unicode="₽" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
|
||||
<glyph unicode="−" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="⌛" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
|
||||
<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
|
||||
<glyph unicode="☁" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
|
||||
<glyph unicode="⛺" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
|
||||
<glyph unicode="✉" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
|
||||
<glyph unicode="✏" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
|
||||
<glyph unicode="" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
|
||||
<glyph unicode="" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
|
||||
<glyph unicode="" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
|
||||
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
|
||||
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
|
||||
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
|
||||
<glyph unicode="" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
|
||||
<glyph unicode="" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
|
||||
<glyph unicode="" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
|
||||
<glyph unicode="" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
|
||||
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
|
||||
<glyph unicode="" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
|
||||
<glyph unicode="" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
|
||||
<glyph unicode="" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
|
||||
<glyph unicode="" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
|
||||
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
|
||||
<glyph unicode="" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
||||
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
|
||||
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
|
||||
<glyph unicode="" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
|
||||
<glyph unicode="" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
|
||||
<glyph unicode="" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
|
||||
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
|
||||
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
|
||||
<glyph unicode="" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
|
||||
<glyph unicode="" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
|
||||
<glyph unicode="" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
|
||||
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
||||
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
||||
<glyph unicode="" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
|
||||
<glyph unicode="" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
|
||||
<glyph unicode="" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
|
||||
<glyph unicode="" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
|
||||
<glyph unicode="" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
|
||||
<glyph unicode="" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
|
||||
<glyph unicode="" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
|
||||
<glyph unicode="" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
|
||||
<glyph unicode="" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
|
||||
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
|
||||
<glyph unicode="" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
|
||||
<glyph unicode="" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
|
||||
<glyph unicode="" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
|
||||
<glyph unicode="" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
|
||||
<glyph unicode="" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
|
||||
<glyph unicode="" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
|
||||
<glyph unicode="" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
|
||||
<glyph unicode="" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
|
||||
<glyph unicode="" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
|
||||
<glyph unicode="" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
|
||||
<glyph unicode="" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
|
||||
<glyph unicode="" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
|
||||
<glyph unicode="" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
|
||||
<glyph unicode="" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
|
||||
<glyph unicode="" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
|
||||
<glyph unicode="" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
|
||||
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
|
||||
<glyph unicode="" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
|
||||
<glyph unicode="" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
|
||||
<glyph unicode="" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
|
||||
<glyph unicode="" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
|
||||
<glyph unicode="" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
||||
<glyph unicode="" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
||||
<glyph unicode="" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
|
||||
<glyph unicode="" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
|
||||
<glyph unicode="" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
|
||||
<glyph unicode="" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
|
||||
<glyph unicode="" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
|
||||
<glyph unicode="" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
|
||||
<glyph unicode="" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
|
||||
<glyph unicode="" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
|
||||
<glyph unicode="" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
|
||||
<glyph unicode="" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
|
||||
<glyph unicode="" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
|
||||
<glyph unicode="" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
|
||||
<glyph unicode="" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
|
||||
<glyph unicode="" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
|
||||
<glyph unicode="" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
|
||||
<glyph unicode="" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
|
||||
<glyph unicode="" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
|
||||
<glyph unicode="" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
|
||||
<glyph unicode="" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
|
||||
<glyph unicode="" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
|
||||
<glyph unicode="" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
|
||||
<glyph unicode="" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
|
||||
<glyph unicode="" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
|
||||
<glyph unicode="" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
|
||||
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
|
||||
<glyph unicode="" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
|
||||
<glyph unicode="" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
|
||||
<glyph unicode="" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
|
||||
<glyph unicode="" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
|
||||
<glyph unicode="" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
|
||||
<glyph unicode="" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
|
||||
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
||||
<glyph unicode="" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
|
||||
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
|
||||
<glyph unicode="" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
||||
<glyph unicode="" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
|
||||
<glyph unicode="" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
||||
<glyph unicode="" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
|
||||
<glyph unicode="" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
|
||||
<glyph unicode="" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
|
||||
<glyph unicode="" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
|
||||
<glyph unicode="" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
|
||||
<glyph unicode="" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
|
||||
<glyph unicode="" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
|
||||
<glyph unicode="" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
|
||||
<glyph unicode="" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
|
||||
<glyph unicode="" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
|
||||
<glyph unicode="" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
|
||||
<glyph unicode="" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
|
||||
<glyph unicode="" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
|
||||
<glyph unicode="" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
|
||||
<glyph unicode="" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
|
||||
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
|
||||
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
|
||||
<glyph unicode="" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
|
||||
<glyph unicode="" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
|
||||
<glyph unicode="" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
|
||||
<glyph unicode="" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
|
||||
<glyph unicode="" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
|
||||
<glyph unicode="" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
|
||||
<glyph unicode="" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
|
||||
<glyph unicode="" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
|
||||
<glyph unicode="" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
|
||||
<glyph unicode="" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
|
||||
<glyph unicode="" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
|
||||
<glyph unicode="" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
|
||||
<glyph unicode="" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
|
||||
<glyph unicode="" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
|
||||
<glyph unicode="" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
|
||||
<glyph unicode="" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
|
||||
<glyph unicode="" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
|
||||
<glyph unicode="" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
|
||||
<glyph unicode="" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
||||
<glyph unicode="" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
||||
<glyph unicode="" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
|
||||
<glyph unicode="" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
||||
<glyph unicode="" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
||||
<glyph unicode="" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
|
||||
<glyph unicode="" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
|
||||
<glyph unicode="" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
|
||||
<glyph unicode="" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
|
||||
<glyph unicode="" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
|
||||
<glyph unicode="" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
|
||||
<glyph unicode="" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
|
||||
<glyph unicode="" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
|
||||
<glyph unicode="" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
|
||||
<glyph unicode="" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
|
||||
<glyph unicode="" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
|
||||
<glyph unicode="" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
|
||||
<glyph unicode="" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
|
||||
<glyph unicode="" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
|
||||
<glyph unicode="" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
|
||||
<glyph unicode="" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
|
||||
<glyph unicode="" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
|
||||
<glyph unicode="" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
|
||||
<glyph unicode="" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
|
||||
<glyph unicode="" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
|
||||
<glyph unicode="" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
|
||||
<glyph unicode="" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
|
||||
<glyph unicode="🔑" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
|
||||
<glyph unicode="🚪" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
|
||||
</font>
|
||||
</defs></svg>
|
||||
|
Before Width: | Height: | Size: 106 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 724 KiB |
7
applications/welcome/static/js/bootstrap.bundle.min.js
vendored
Normal file
7
applications/welcome/static/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +0,0 @@
|
||||
/*! Respond.js v1.4.2: min/max-width media query polyfill
|
||||
* Copyright 2014 Scott Jehl
|
||||
* Licensed under MIT
|
||||
* http://j.mp/respondjs */
|
||||
|
||||
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b<t.length;b++){var c=t[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!p[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(w(c.styleSheet.rawCssText,e,f),p[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!s||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}x()};y(),c.update=y,c.getEmValue=u,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
|
||||
Created and copyrighted by Massimo Di Pierro <massimo.dipierro@gmail.com>
|
||||
(MIT license)
|
||||
|
||||
Example:
|
||||
|
||||
<script src="share.js"></script>
|
||||
|
||||
**/
|
||||
|
||||
jQuery(function(){
|
||||
var script_source = jQuery('script[src*="share.js"]').attr('src');
|
||||
var params = function(name,default_value) {
|
||||
var match = RegExp('[?&]' + name + '=([^&]*)').exec(script_source);
|
||||
return match && decodeURIComponent(match[1].replace(/\+/g, ' '))||default_value;
|
||||
}
|
||||
var path = params('static','social');
|
||||
var url = encodeURIComponent(window.location.href);
|
||||
var host = window.location.hostname;
|
||||
var title = escape(jQuery('title').text());
|
||||
var twit = 'http://twitter.com/home?status='+title+'%20'+url;
|
||||
var facebook = 'http://www.facebook.com/sharer.php?u='+url;
|
||||
var gplus = 'https://plus.google.com/share?url='+url;
|
||||
var tbar = '<div id="socialdrawer"><span>Share<br/></span><div id="sicons"><a href="'+twit+'" id="twit" title="Share on twitter"><img src="'+path+'/twitter.png" alt="Share on Twitter" width="32" height="32" /></a><a href="'+facebook+'" id="facebook" title="Share on Facebook"><img src="'+path+'/facebook.png" alt="Share on facebook" width="32" height="32" /></a><a href="'+gplus+'" id="gplus" title="Share on Google Plus"><img src="'+path+'/gplus-32.png" alt="Share on Google Plus" width="32" height="32" /></a></div></div>';
|
||||
// Add the share tool bar.
|
||||
jQuery('body').append(tbar);
|
||||
var st = jQuery('#socialdrawer');
|
||||
st.css({'opacity':'.7','z-index':'3000','background':'#FFF','border':'solid 1px #666','border-width':' 1px 0 0 1px','height':'20px','width':'40px','position':'fixed','bottom':'0','right':'0','padding':'2px 5px','overflow':'hidden','-webkit-border-top-left-radius':' 12px','-moz-border-radius-topleft':' 12px','border-top-left-radius':' 12px','-moz-box-shadow':' -3px -3px 3px rgba(0,0,0,0.5)','-webkit-box-shadow':' -3px -3px 3px rgba(0,0,0,0.5)','box-shadow':' -3px -3px 3px rgba(0,0,0,0.5)'});
|
||||
jQuery('#socialdrawer a').css({'float':'left','width':'32px','margin':'3px 2px 2px 2px','padding':'0','cursor':'pointer'});
|
||||
jQuery('#socialdrawer span').css({'float':'left','margin':'2px 3px','text-shadow':' 1px 1px 1px #FFF','color':'#444','font-size':'12px','line-height':'1em'});
|
||||
jQuery('#socialdrawer img').hide();
|
||||
// hover
|
||||
st.click(function(){
|
||||
jQuery(this).animate({height:'40px', width:'160px', opacity: 0.95}, 300);
|
||||
jQuery('#socialdrawer img').show();
|
||||
});
|
||||
//leave
|
||||
st.mouseleave(function(){
|
||||
st.animate({height:'20px', width: '40px', opacity: .7}, 300);
|
||||
jQuery('#socialdrawer img').hide();
|
||||
return false;
|
||||
} );
|
||||
});
|
||||
@@ -12,6 +12,10 @@
|
||||
$.error('web2py.js has already been loaded!');
|
||||
}
|
||||
|
||||
var FORMDATA_IS_SUPPORTED = typeof(FormData) !== 'undefined';
|
||||
var animateIn = 'fadeIn';
|
||||
// var animateIn = 'slideDown';
|
||||
|
||||
String.prototype.reverse = function () {
|
||||
return this.split('').reverse().join('');
|
||||
};
|
||||
@@ -178,7 +182,7 @@
|
||||
},
|
||||
/* manage errors in forms */
|
||||
manage_errors: function (target) {
|
||||
$('div.error', target).hide().slideDown('slow');
|
||||
$('div.error', target).hide()[animateIn]('slow');
|
||||
},
|
||||
after_ajax: function (xhr) {
|
||||
/* called whenever an ajax request completes */
|
||||
@@ -263,13 +267,17 @@
|
||||
}
|
||||
});
|
||||
/* help preventing double form submission for normal form (not LOADed) */
|
||||
$(doc).on('submit', 'form', function () {
|
||||
var submit_button = $(this).find(web2py.formInputClickSelector);
|
||||
web2py.disableElement(submit_button);
|
||||
$(doc).on('submit', 'form', function (e) {
|
||||
var submit_buttons = $(this).find(web2py.formInputClickSelector);
|
||||
submit_buttons.each(function() {
|
||||
web2py.disableElement($(this));
|
||||
})
|
||||
/* safeguard in case the form doesn't trigger a refresh,
|
||||
see https://github.com/web2py/web2py/issues/1100 */
|
||||
setTimeout(function () {
|
||||
web2py.enableElement(submit_button);
|
||||
submit_buttons.each(function() {
|
||||
web2py.enableElement($(this));
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
doc.ajaxSuccess(function (e, xhr) {
|
||||
@@ -320,7 +328,15 @@
|
||||
form.submit(function (e) {
|
||||
web2py.disableElement(form.find(web2py.formInputClickSelector));
|
||||
web2py.hide_flash();
|
||||
web2py.ajax_page('post', url, form.serialize(), target, form);
|
||||
|
||||
var formData;
|
||||
if (FORMDATA_IS_SUPPORTED) {
|
||||
formData = new FormData(form[0]); // Allows file uploads.
|
||||
} else {
|
||||
formData = form.serialize(); // Fallback for older browsers.
|
||||
}
|
||||
web2py.ajax_page('post', url, formData, target, form);
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
form.on('click', web2py.formInputClickSelector, function (e) {
|
||||
@@ -339,11 +355,18 @@
|
||||
if (web2py.isUndefined(element)) element = $(document);
|
||||
/* if target is not there, fill it with something that there isn't in the page*/
|
||||
if (web2py.isUndefined(target) || target === '') target = 'w2p_none';
|
||||
|
||||
/* processData and contentType must be set to false when passing a FormData
|
||||
object to jQuery.ajax. */
|
||||
var isFormData = Object.prototype.toString.call(data) === '[object FormData]';
|
||||
var contentType = isFormData ? false : 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
if (web2py.fire(element, 'ajax:before', null, target)) { /*test a usecase, should stop here if returns false */
|
||||
$.ajax({
|
||||
'type': method,
|
||||
'url': action,
|
||||
'data': data,
|
||||
'processData': !isFormData,
|
||||
'contentType': contentType,
|
||||
'beforeSend': function (xhr, settings) {
|
||||
xhr.setRequestHeader('web2py-component-location', document.location);
|
||||
xhr.setRequestHeader('web2py-component-element', target);
|
||||
@@ -594,8 +617,8 @@
|
||||
flash: function (message, status) {
|
||||
var flash = $('.w2p_flash');
|
||||
web2py.hide_flash();
|
||||
flash.html(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||
flash.text(message).addClass(status);
|
||||
if (flash.html()) flash.append('<span id="closeflash"> × </span>')[animateIn]();
|
||||
},
|
||||
hide_flash: function () {
|
||||
$('.w2p_flash').fadeOut(0).html('');
|
||||
@@ -609,7 +632,7 @@
|
||||
for (var k = 0; k < triggers[id].length; k++) {
|
||||
var dep = $('#' + triggers[id][k], target);
|
||||
var tr = $('#' + triggers[id][k] + '__row', target);
|
||||
if (t.is(dep.attr('data-show-if'))) tr.slideDown();
|
||||
if (t.is(dep.attr('data-show-if'))) tr[animateIn]();
|
||||
else tr.hide();
|
||||
}
|
||||
};
|
||||
@@ -699,8 +722,9 @@
|
||||
});
|
||||
},
|
||||
/* Disables form elements:
|
||||
- Does not disable elements with 'data-w2p_disable' attribute
|
||||
- Caches element value in 'w2p_enable_with' data store
|
||||
- Replaces element text with value of 'data-disable-with' attribute
|
||||
- Replaces element text with value of 'data-w2p_disable_with' attribute
|
||||
- Sets disabled property to true
|
||||
*/
|
||||
disableFormElements: function (form) {
|
||||
@@ -712,13 +736,15 @@
|
||||
if (!web2py.isUndefined(disable)) {
|
||||
return false;
|
||||
}
|
||||
if (web2py.isUndefined(disable_with)) {
|
||||
element.data('w2p_disable_with', element[method]());
|
||||
if (!element.is(':file')) { // Altering file input values is not allowed.
|
||||
if (web2py.isUndefined(disable_with)) {
|
||||
element.data('w2p_disable_with', element[method]());
|
||||
}
|
||||
if (web2py.isUndefined(element.data('w2p_enable_with'))) {
|
||||
element.data('w2p_enable_with', element[method]());
|
||||
}
|
||||
element[method](element.data('w2p_disable_with'));
|
||||
}
|
||||
if (web2py.isUndefined(element.data('w2p_enable_with'))) {
|
||||
element.data('w2p_enable_with', element[method]());
|
||||
}
|
||||
element[method](element.data('w2p_disable_with'));
|
||||
element.prop('disabled', true);
|
||||
});
|
||||
},
|
||||
@@ -799,4 +825,4 @@ web2py_event_handlers = jQuery.web2py.event_handlers;
|
||||
web2py_trap_link = jQuery.web2py.trap_link;
|
||||
web2py_calc_entropy = jQuery.web2py.calc_entropy;
|
||||
*/
|
||||
/* compatibility code - end*/
|
||||
/* compatibility code - end*/
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
<h2>{{=T("Available Databases and Tables")}}</h2>
|
||||
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active" ><a href="#alltables" data-toggle="tab">Tables</a></li>
|
||||
<li><a href="#hooks" data-toggle="tab">Hooks</a></li>
|
||||
<li class="nav-item"><a href="#alltables" data-toggle="tab" class="nav-link active">Tables</a></li>
|
||||
<li class="nav-item"><a href="#hooks" data-toggle="tab" class="nav-link">Hooks</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="alltables">
|
||||
<table class="table">
|
||||
<table class="table table-striped">
|
||||
{{for db in sorted(databases):}}
|
||||
{{for table in databases[db].tables:}}
|
||||
{{qry='%s.%s.id>0'%(db,table)}}
|
||||
@@ -37,10 +37,10 @@
|
||||
{{pass}}
|
||||
<tr>
|
||||
<th style="font-size: 1.75em;">
|
||||
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
||||
» {{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
||||
</th>
|
||||
<td>
|
||||
{{=A(str(T('New Record')),_href=URL('insert',args=[db,table]),_class="btn btn-default")}}
|
||||
{{=A(str(T('New Record')),_href=URL('insert',args=[db,table]),_class="btn btn-primary")}}
|
||||
</td>
|
||||
</tr>
|
||||
{{pass}}
|
||||
@@ -61,28 +61,31 @@
|
||||
</pre>
|
||||
{{pass}}
|
||||
{{if table:}}
|
||||
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn btn-default")}}<br/><br/>
|
||||
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn btn-primary", _role="button")}}<br/><br/>
|
||||
<hr />
|
||||
<h3>{{=T("Rows in Table")}}</h3><br/>
|
||||
{{else:}}
|
||||
<h3>{{=T("Rows selected")}}</h3><br/>
|
||||
{{pass}}
|
||||
{{=form}}
|
||||
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
||||
<p class="text-muted">{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
||||
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
|
||||
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
|
||||
<br/><br/>
|
||||
<h4>{{=T("%s selected", nrows)}}</h4>
|
||||
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn btn-default")}}{{pass}}
|
||||
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn btn-default")}}{{pass}}
|
||||
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn btn-primary")}}{{pass}}
|
||||
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn btn-primary")}}{{pass}}
|
||||
{{if rows:}}
|
||||
<div style="overflow:auto; width:80%;">
|
||||
{{linkto = lambda f, t, r: URL('update', args=[request.args[0], r, f]) if f else "#"}}
|
||||
{{upload=URL('download',args=request.args[0])}}
|
||||
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
|
||||
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='table table-striped table-bordered sortable')}}
|
||||
</div>
|
||||
{{pass}}
|
||||
<br/><br/><h3>{{=T("Import/Export")}}</h3><br/>
|
||||
<a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}" class="btn btn-default">{{=T("export as csv file")}}</a>
|
||||
<br/><br/>
|
||||
<hr />
|
||||
<h3>{{=T("Import/Export")}}</h3><br/>
|
||||
<a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}" class="btn btn-primary">{{=T("export as csv file")}}</a>
|
||||
{{=formcsv or ''}}
|
||||
|
||||
{{elif request.function=='insert':}}
|
||||
@@ -148,7 +151,7 @@
|
||||
{{=T.M("(**%.0d MB**)", total['bytes'] / 1048576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("**not available** (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -176,7 +179,7 @@
|
||||
{{=T.M("(**%.0d MB**)", ram['bytes'] / 10485576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -205,7 +208,7 @@
|
||||
{{=T.M("(**%.0d MB**)", disk['bytes'] / 1048576)}}
|
||||
{{pass}}
|
||||
{{else:}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}}
|
||||
{{=T.M("``**not available**``:red (requires the Python [[Pympler https://pypi.python.org/pypi/Pympler popup]] library)")}}
|
||||
{{pass}}
|
||||
</p>
|
||||
<p>
|
||||
@@ -239,7 +242,7 @@
|
||||
{{=T("No databases in this application")}}
|
||||
{{else:}}
|
||||
<div id="vis"></div>
|
||||
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
||||
<link rel="stylesheet" href="{{=URL('admin','static','css/d3_graph.css')}}"/>
|
||||
<script>
|
||||
// Define the d3 input data
|
||||
{{from gluon.serializers import json }}
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}
|
||||
{{extend 'layout.html'}}
|
||||
|
||||
{{block header}}
|
||||
<header class="container-fluid background">
|
||||
<div class="jumbotron text-center">
|
||||
{{if response.title:}}
|
||||
<h1>{{=response.title}}
|
||||
<small>{{=response.subtitle or ''}}</small></h1>
|
||||
{{pass}}
|
||||
</div>
|
||||
</header>
|
||||
<div class="jumbotron jumbotron-fluid" style="background-color: #333; color:white; padding:30px;word-wrap:break-word;">
|
||||
<div class="container center">
|
||||
<h1 class="display-5">/{{=request.application}}/{{=request.controller}}/{{=request.function}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if 'message' in globals():}}
|
||||
<h2>{{=message}}</h2>
|
||||
<p class="lead">{{=T('How did you get here?')}}</p>
|
||||
<ol>
|
||||
<ol style="word-wrap:break-word;">
|
||||
<li>{{=T('You are successfully running web2py')}}</li>
|
||||
<li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>
|
||||
<li>{{=XML(T('Which called the function %s located in the file %s',
|
||||
@@ -27,26 +23,25 @@
|
||||
_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>
|
||||
<li>{{=T('You can modify this application and adapt it to your needs')}}</li>
|
||||
</ol>
|
||||
<div class="jumbotron jumbotron-fluid" style="padding:30px;word-wrap:break-word;">
|
||||
<div class="container center">
|
||||
<a class="btn btn-primary" href="{{=URL('admin','default','index')}}">
|
||||
<i class="fa fa-cog"></i>
|
||||
{{=T("admin")}}
|
||||
</a>
|
||||
<a class="btn btn-secondary" href="{{=URL('examples','default','index')}}">{{=T("Online examples")}}</a>
|
||||
<a class="btn btn-secondary" href="http://web2py.com">web2py.com</a>
|
||||
<a class="btn btn-secondary" href="http://web2py.com/book">{{=T('Documentation')}}</a>
|
||||
<a class="btn btn-secondary" href="{{=URL('default','api_get_user_email')}}">{{=T('API Example')}}</a>
|
||||
<a class="btn btn-secondary" href="{{=URL('default','grid/auth_user')}}">{{=T('Grid Example')}}</a>
|
||||
<a class="btn btn-secondary" href="{{=URL('default','wiki')}}">{{=T('Wiki Example')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{elif 'content' in globals():}}
|
||||
{{=content}}
|
||||
{{else:}}
|
||||
{{=BEAUTIFY(response._vars)}}
|
||||
{{pass}}
|
||||
|
||||
{{block right_sidebar}}
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading"><h3 class="panel-title"><a class="btn-block"
|
||||
href="{{=URL('admin','default','index')}}">
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
{{=T("admin")}}
|
||||
</a></h3></div>
|
||||
<div class="panel-body">
|
||||
{{=T("Don't know what to do?")}}
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
|
||||
<li class="list-group-item"><a href="http://web2py.com">web2py.com</a></li>
|
||||
<li class="list-group-item"><a href="http://web2py.com/book">{{=T('Documentation')}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
{{
|
||||
if request.args(0)=='login':
|
||||
if not 'register' in auth.settings.actions_disabled:
|
||||
form.add_button(T('Sign Up'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn btn-default')
|
||||
form.add_button(T('Sign Up'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn btn-default btn-secondary')
|
||||
pass
|
||||
if not 'request_reset_password' in auth.settings.actions_disabled:
|
||||
form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn btn-default')
|
||||
form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn btn-default btn-secondary')
|
||||
pass
|
||||
pass
|
||||
=form
|
||||
|
||||
@@ -11,6 +11,3 @@ It is used as default when a view is not provided for your controllers
|
||||
{{elif len(response._vars)>1:}}
|
||||
{{=BEAUTIFY(response._vars)}}
|
||||
{{pass}}
|
||||
{{if request.is_local:}}
|
||||
{{=response.toolbar()}}
|
||||
{{pass}}
|
||||
|
||||
@@ -20,101 +20,109 @@
|
||||
http://google.com/webmasters -->
|
||||
<meta name="google-site-verification" content="">
|
||||
<!-- include stylesheets -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="{{=URL('static','css/bootstrap.min.css')}}"/>
|
||||
<link rel="stylesheet" href="{{=URL('static','css/web2py-bootstrap3.css')}}"/>
|
||||
<link rel="stylesheet" href="{{=URL('static','css/web2py-bootstrap4.css')}}"/>
|
||||
<link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="{{=URL('static','images/favicon.png')}}">
|
||||
<!-- All JavaScript at the bottom, except for Modernizr which enables
|
||||
HTML5 elements & feature detects -->
|
||||
<script src="{{=URL('static','js/modernizr-2.8.3.min.js')}}"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="{{=URL('static','js/respond-1.4.2.min.js')}}"></script>
|
||||
<![endif]-->
|
||||
<!-- Favicons -->
|
||||
{{include 'web2py_ajax.html'}} <!-- this includes jquery.js, calendar.js/.css and web2py.js -->
|
||||
{{block head}}{{end}}
|
||||
{{
|
||||
# using sidebars need to know what sidebar you want to use
|
||||
mc0 = 'col-md-12'
|
||||
mc1 = 'col-md-9'
|
||||
mc2 = 'col-md-6'
|
||||
left_sidebar_enabled = globals().get('left_sidebar_enabled', False)
|
||||
right_sidebar_enabled = globals().get('right_sidebar_enabled', False)
|
||||
middle_column = {0: mc0, 1: mc1, 2: mc2}[
|
||||
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
|
||||
}}
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 8]><p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p><![endif]-->
|
||||
<div class="w2p_flash alert alert-dismissable">{{=response.flash or ''}}</div>
|
||||
<!-- Navbar ======================================= -->
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
{{=response.logo or ''}}
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{='auth' in globals() and auth.navbar('Welcome',mode='dropdown') or ''}}
|
||||
</ul>
|
||||
{{if response.menu:}}
|
||||
{{=MENU(response.menu, _class='nav navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-faded">
|
||||
<a class="navbar-brand" href="http://web2py.com">web2py</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div id="navbarNavDropdown" class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav">
|
||||
{{for _item in response.menu or []:}}
|
||||
{{if len(_item)<4 or not _item[3]:}}
|
||||
<li class="nav-item {{if _item[1]:}}active{{pass}}">
|
||||
<a class="nav-link" href="{{=_item[2]}}">{{=_item[0]}}</a>
|
||||
</li>
|
||||
{{else:}}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="{{=_item[2]}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{=_item[0]}}</a>
|
||||
<div class="dropdown-menu">
|
||||
{{for _subitem in _item[3]:}}
|
||||
<a class="dropdown-item" href="{{=_subitem[2]}}">{{=_subitem[0]}}</a>
|
||||
{{pass}}
|
||||
</div>
|
||||
</li>
|
||||
{{pass}}
|
||||
</div>
|
||||
{{pass}}
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
<input class="form-control mr-sm-2" type="text" placeholder="Search">
|
||||
</form>
|
||||
{{if 'auth' in globals():}}
|
||||
<ul class="navbar-nav ml-lg-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{if auth.user:}}{{=auth.user.first_name}}{{else:}}LOGIN{{pass}}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
{{if auth.user:}}
|
||||
<a class="dropdown-item" href="{{=URL('default','user/profile')}}">{{=T('Profile')}}</a>
|
||||
{{if 'change_password' not in auth.settings.actions_disabled:}}
|
||||
<a class="dropdown-item" href="{{=URL('default','user/change_password')}}">{{=T('Change Password')}}</a>
|
||||
{{pass}}
|
||||
<a class="dropdown-item" href="{{=URL('default','user/logout')}}">{{=T('Logout')}}</a>
|
||||
{{else:}}
|
||||
<a class="dropdown-item" href="{{=URL('default','user/login')}}">{{=T('Login')}}</a>
|
||||
{{if 'register' not in auth.settings.actions_disabled:}}
|
||||
<a class="dropdown-item" href="{{=URL('default','user/register')}}">{{=T('Sign up')}}</a>
|
||||
{{pass}}
|
||||
{{if 'retrieve_password' not in auth.settings.actions_disabled:}}
|
||||
<a class="dropdown-item" href="{{=URL('default','user/retrieve_password')}}">{{=T('Lost Password')}}</a>
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{pass}}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Masthead ===================================== -->
|
||||
{{block header}}
|
||||
{{end}}
|
||||
<!-- Main ========================================= -->
|
||||
<!-- Begin page content -->
|
||||
<div class="container-fluid main-container">
|
||||
{{if left_sidebar_enabled:}}
|
||||
<div class="col-md-3 left-sidebar">
|
||||
{{block left_sidebar}}
|
||||
<h3>Left Sidebar</h3>
|
||||
<p></p>
|
||||
{{end}}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{block center}}
|
||||
{{include}}
|
||||
{{end}}
|
||||
{{=response.toolbar() if response.show_toolbar else ''}}
|
||||
</div>
|
||||
{{pass}}
|
||||
|
||||
<div class="{{=middle_column}}">
|
||||
{{block center}}
|
||||
{{include}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{if right_sidebar_enabled:}}
|
||||
<div class="col-md-3">
|
||||
{{block right_sidebar}}
|
||||
<h3>Right Sidebar</h3>
|
||||
<p></p>
|
||||
{{end}}
|
||||
</div>
|
||||
{{pass}}
|
||||
|
||||
</div>
|
||||
|
||||
{{block footer}} <!-- this is default footer -->
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="copyright pull-left">{{=T('Copyright')}} © {{=request.now.year}}</div>
|
||||
{{block footer}} <!-- this is default footer -->
|
||||
<footer class="footer container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="copyright pull-left">{{=T('Copyright')}} © {{=request.now.year}}</div>
|
||||
<div id="poweredBy" class="pull-right">
|
||||
{{=T('Powered by')}}
|
||||
<a href="http://www.web2py.com/">web2py</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{{end}}
|
||||
<!-- The javascript =============================== -->
|
||||
<script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
|
||||
<script src="{{=URL('static','js/web2py-bootstrap3.js')}}"></script>
|
||||
<script src="{{=URL('static','js/bootstrap.bundle.min.js')}}"></script>
|
||||
<script src="{{=URL('static','js/web2py-bootstrap4.js')}}"></script>
|
||||
{{block page_js}}{{end page_js}}
|
||||
{{if response.google_analytics_id:}}
|
||||
<!-- Analytics ==================================== -->
|
||||
@@ -125,7 +133,5 @@
|
||||
});
|
||||
</script>
|
||||
{{pass}}
|
||||
<!-- Share ============================y============ -->
|
||||
<script src="{{=URL('static','js/share.js',vars=dict(static=URL('static','images')))}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,6 +10,10 @@ environment:
|
||||
COVERAGE_PROCESS_START: gluon/tests/coverage.ini
|
||||
PYTHON_ARCH: "64"
|
||||
|
||||
- PYTHON: "C:/Python36"
|
||||
COVERAGE_PROCESS_START: gluon/tests/coverage.ini
|
||||
PYTHON_ARCH: "64"
|
||||
|
||||
clone_depth: 50
|
||||
|
||||
init:
|
||||
@@ -20,7 +24,6 @@ install:
|
||||
- python -m ensurepip
|
||||
- pip install codecov
|
||||
- git submodule update --init --recursive
|
||||
- pip install pycrypto
|
||||
# Check that we have the expected version and architecture for Python
|
||||
- "python --version"
|
||||
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#
|
||||
# To log a message:
|
||||
#
|
||||
# logger.debug("You ought to know that %s" % details)
|
||||
# logger.debug("You ought to know that %s", details)
|
||||
#
|
||||
# Note that a logging call will be governed by the most restrictive level
|
||||
# set by the setLevel call, the [logger_myapp] section, and the [handler_...]
|
||||
|
||||
2
fabfile.py
vendored
2
fabfile.py
vendored
@@ -122,7 +122,7 @@ def deploy(appname=None, all=False):
|
||||
|
||||
if all=='all' or not backup:
|
||||
local('zip -r _update.zip * -x *~ -x .* -x \#* -x *.bak -x *.bak2')
|
||||
else:
|
||||
else:
|
||||
local('zip -r _update.zip */*.py */*/*.py views/*.html views/*/*.html static/*')
|
||||
|
||||
put('_update.zip','/tmp/_update.zip')
|
||||
|
||||
@@ -26,7 +26,7 @@ if PY2:
|
||||
from email.MIMEText import MIMEText
|
||||
from email.Charset import add_charset, QP as charset_QP
|
||||
from urllib import FancyURLopener, urlencode, urlopen
|
||||
from urllib import quote as urllib_quote, unquote as urllib_unquote
|
||||
from urllib import quote as urllib_quote, unquote as urllib_unquote, quote_plus as urllib_quote_plus
|
||||
from string import maketrans
|
||||
from types import ClassType
|
||||
import cgi
|
||||
@@ -35,6 +35,7 @@ if PY2:
|
||||
from gluon.contrib import ipaddress
|
||||
BytesIO = StringIO
|
||||
reduce = reduce
|
||||
reload = reload
|
||||
hashlib_md5 = hashlib.md5
|
||||
iterkeys = lambda d: d.iterkeys()
|
||||
itervalues = lambda d: d.itervalues()
|
||||
@@ -63,7 +64,7 @@ if PY2:
|
||||
return None
|
||||
if isinstance(obj, (bytes, bytearray, buffer)):
|
||||
return bytes(obj)
|
||||
if isinstance(obj, unicode):
|
||||
if hasattr(obj, 'encode'):
|
||||
return obj.encode(charset, errors)
|
||||
raise TypeError('Expected bytes')
|
||||
|
||||
@@ -77,6 +78,7 @@ else:
|
||||
import pickle
|
||||
from io import StringIO, BytesIO
|
||||
import copyreg
|
||||
from importlib import reload
|
||||
from functools import reduce
|
||||
from html.parser import HTMLParser
|
||||
from http import cookies as Cookie
|
||||
@@ -94,7 +96,7 @@ else:
|
||||
from email.header import Header
|
||||
from email.charset import Charset, add_charset, QP as charset_QP
|
||||
from urllib.request import FancyURLopener, urlopen
|
||||
from urllib.parse import quote as urllib_quote, unquote as urllib_unquote, urlencode
|
||||
from urllib.parse import quote as urllib_quote, unquote as urllib_unquote, urlencode, quote_plus as urllib_quote_plus
|
||||
from http import cookiejar as cookielib
|
||||
from xmlrpc.client import ProtocolError
|
||||
import html # warning, this is the python3 module and not the web2py html module
|
||||
@@ -122,7 +124,7 @@ else:
|
||||
return None
|
||||
if isinstance(obj, (bytes, bytearray, memoryview)):
|
||||
return bytes(obj)
|
||||
if isinstance(obj, str):
|
||||
if hasattr(obj, 'encode'):
|
||||
return obj.encode(charset, errors)
|
||||
raise TypeError('Expected bytes')
|
||||
|
||||
@@ -151,7 +153,7 @@ def with_metaclass(meta, *bases):
|
||||
def to_unicode(obj, charset='utf-8', errors='strict'):
|
||||
if obj is None:
|
||||
return None
|
||||
if not isinstance(obj, bytes):
|
||||
if not hasattr(obj, 'decode'):
|
||||
return text_type(obj)
|
||||
return obj.decode(charset, errors)
|
||||
|
||||
|
||||
@@ -54,7 +54,8 @@ def app_pack(app, request, raise_ex=False, filenames=None):
|
||||
|
||||
"""
|
||||
try:
|
||||
if filenames is None: app_cleanup(app, request)
|
||||
if filenames is None:
|
||||
app_cleanup(app, request)
|
||||
filename = apath('../deposit/web2py.app.%s.w2p' % app, request)
|
||||
w2p_pack(filename, apath(app, request), filenames=filenames)
|
||||
return filename
|
||||
@@ -104,7 +105,8 @@ def app_cleanup(app, request):
|
||||
if os.path.exists(path):
|
||||
for f in os.listdir(path):
|
||||
try:
|
||||
if f[:1] != '.': os.unlink(os.path.join(path, f))
|
||||
if f[:1] != '.':
|
||||
os.unlink(os.path.join(path, f))
|
||||
except IOError:
|
||||
r = False
|
||||
|
||||
@@ -113,7 +115,8 @@ def app_cleanup(app, request):
|
||||
if os.path.exists(path):
|
||||
for f in os.listdir(path):
|
||||
try:
|
||||
if f[:1] != '.': recursive_unlink(os.path.join(path, f))
|
||||
if f[:1] != '.':
|
||||
recursive_unlink(os.path.join(path, f))
|
||||
except (OSError, IOError):
|
||||
r = False
|
||||
|
||||
@@ -123,7 +126,8 @@ def app_cleanup(app, request):
|
||||
CacheOnDisk(folder=path).clear()
|
||||
for f in os.listdir(path):
|
||||
try:
|
||||
if f[:1] != '.': recursive_unlink(os.path.join(path, f))
|
||||
if f[:1] != '.':
|
||||
recursive_unlink(os.path.join(path, f))
|
||||
except (OSError, IOError):
|
||||
r = False
|
||||
return r
|
||||
@@ -175,10 +179,9 @@ def app_create(app, request, force=False, key=None, info=False):
|
||||
return False
|
||||
try:
|
||||
w2p_unpack('welcome.w2p', path)
|
||||
for subfolder in [
|
||||
'models', 'views', 'controllers', 'databases',
|
||||
'modules', 'cron', 'errors', 'sessions', 'cache',
|
||||
'languages', 'static', 'private', 'uploads']:
|
||||
for subfolder in ['models', 'views', 'controllers', 'databases',
|
||||
'modules', 'cron', 'errors', 'sessions', 'cache',
|
||||
'languages', 'static', 'private', 'uploads']:
|
||||
subpath = os.path.join(path, subfolder)
|
||||
if not os.path.exists(subpath):
|
||||
os.mkdir(subpath)
|
||||
@@ -368,7 +371,7 @@ def unzip(filename, dir, subfolder=''):
|
||||
for name in sorted(zf.namelist()):
|
||||
if not name.startswith(subfolder):
|
||||
continue
|
||||
#print name[n:]
|
||||
# print name[n:]
|
||||
if name.endswith('/'):
|
||||
folder = os.path.join(dir, name[n:])
|
||||
if not os.path.exists(folder):
|
||||
@@ -435,6 +438,7 @@ def add_path_first(path):
|
||||
if not global_settings.web2py_runtime_gae:
|
||||
site.addsitedir(path)
|
||||
|
||||
|
||||
def try_mkdir(path):
|
||||
if not os.path.exists(path):
|
||||
try:
|
||||
@@ -444,11 +448,12 @@ def try_mkdir(path):
|
||||
else:
|
||||
os.mkdir(path)
|
||||
except OSError as e:
|
||||
if e.strerror == 'File exists': # In case of race condition.
|
||||
if e.strerror == 'File exists': # In case of race condition.
|
||||
pass
|
||||
else:
|
||||
raise e
|
||||
|
||||
|
||||
def create_missing_folders():
|
||||
if not global_settings.web2py_runtime_gae:
|
||||
for path in ('applications', 'deposit', 'site-packages', 'logs'):
|
||||
|
||||
@@ -20,10 +20,10 @@ DEFAULT = lambda: None
|
||||
class AuthAPI(object):
|
||||
"""
|
||||
AuthAPI is a barebones Auth implementation which does not have a concept of
|
||||
HTML forms or redirects, emailing or even an URL, you are responsible for
|
||||
HTML forms or redirects, emailing or even an URL, you are responsible for
|
||||
all that if you use it.
|
||||
The main Auth functions such as login, logout, register, profile are designed
|
||||
in a Dict In -> Dict Out logic so, for instance, if you set
|
||||
in a Dict In -> Dict Out logic so, for instance, if you set
|
||||
registration_requires_verification you are responsible for sending the key to
|
||||
the user and even rolling back the transaction if you can't do it.
|
||||
|
||||
@@ -115,7 +115,7 @@ class AuthAPI(object):
|
||||
if auth.last_visit and auth.last_visit + delta > now:
|
||||
self.user = auth.user
|
||||
# this is a trick to speed up sessions to avoid many writes
|
||||
if (now - auth.last_visit).seconds > (auth.expiration / 10):
|
||||
if (now - auth.last_visit).seconds > (auth.expiration // 10):
|
||||
auth.last_visit = now
|
||||
else:
|
||||
self.user = None
|
||||
@@ -245,13 +245,13 @@ class AuthAPI(object):
|
||||
migrate = db._migrate
|
||||
if fake_migrate is None:
|
||||
fake_migrate = db._fake_migrate
|
||||
|
||||
|
||||
settings = self.settings
|
||||
if username is None:
|
||||
username = settings.use_username
|
||||
else:
|
||||
settings.use_username = username
|
||||
|
||||
|
||||
if not self.signature:
|
||||
self.define_signature()
|
||||
if signature is True:
|
||||
@@ -443,7 +443,9 @@ class AuthAPI(object):
|
||||
# log messages should not be translated
|
||||
if type(description).__name__ == 'lazyT':
|
||||
description = description.m
|
||||
self.table_event().insert(description=str(description % vars), origin=origin, user_id=user_id)
|
||||
if not user_id or self.table_user()[user_id]:
|
||||
self.table_event().insert(
|
||||
description=str(description % vars), origin=origin, user_id=user_id)
|
||||
|
||||
def id_group(self, role):
|
||||
"""
|
||||
@@ -557,27 +559,43 @@ class AuthAPI(object):
|
||||
self.log_event(self.messages['del_membership_log'],
|
||||
dict(user_id=user_id, group_id=group_id))
|
||||
ret = self.db(membership.user_id == user_id)(membership.group_id == group_id).delete()
|
||||
if group_id in self.user_groups:
|
||||
if group_id in self.user_groups and user_id == self.user_id:
|
||||
del self.user_groups[group_id]
|
||||
return ret
|
||||
|
||||
def has_membership(self, group_id=None, user_id=None, role=None):
|
||||
def has_membership(self, group_id=None, user_id=None, role=None, cached=False):
|
||||
"""
|
||||
Checks if user is member of group_id or role
|
||||
|
||||
NOTE: To avoid database query at each page load that use auth.has_membership, someone can use cached=True.
|
||||
If cached is set to True has_membership() check group_id or role only against auth.user_groups variable
|
||||
which is populated properly only at login time. This means that if an user membership change during a
|
||||
given session the user has to log off and log in again in order to auth.user_groups to be properly
|
||||
recreated and reflecting the user membership modification. There is one exception to this log off and
|
||||
log in process which is in case that the user change his own membership, in this case auth.user_groups
|
||||
can be properly update for the actual connected user because web2py has access to the proper session
|
||||
user_groups variable. To make use of this exception someone has to place an "auth.update_groups()"
|
||||
instruction in his app code to force auth.user_groups to be updated. As mention this will only work if it
|
||||
the user itself that change it membership not if another user, let say an administrator, change someone
|
||||
else's membership.
|
||||
"""
|
||||
group_id = group_id or self.id_group(role)
|
||||
try:
|
||||
group_id = int(group_id)
|
||||
except:
|
||||
group_id = self.id_group(group_id) # interpret group_id as a role
|
||||
if not user_id and self.user:
|
||||
user_id = self.user.id
|
||||
membership = self.table_membership()
|
||||
if group_id and user_id and self.db((membership.user_id == user_id) &
|
||||
(membership.group_id == group_id)).select():
|
||||
r = True
|
||||
if cached:
|
||||
id_role = group_id or role
|
||||
r = (user_id and id_role in self.user_groups.values()) or (user_id and id_role in self.user_groups)
|
||||
else:
|
||||
r = False
|
||||
group_id = group_id or self.id_group(role)
|
||||
try:
|
||||
group_id = int(group_id)
|
||||
except:
|
||||
group_id = self.id_group(group_id) # interpret group_id as a role
|
||||
membership = self.table_membership()
|
||||
if group_id and user_id and self.db((membership.user_id == user_id) &
|
||||
(membership.group_id == group_id)).select():
|
||||
r = True
|
||||
else:
|
||||
r = False
|
||||
self.log_event(self.messages['has_membership_log'],
|
||||
dict(user_id=user_id, group_id=group_id, check=r))
|
||||
return r
|
||||
@@ -972,7 +990,8 @@ class AuthAPI(object):
|
||||
requires = [requires]
|
||||
requires = list(filter(lambda t: isinstance(t, CRYPT), requires))
|
||||
if requires:
|
||||
requires[0].min_length = 0
|
||||
requires[0] = CRYPT(**requires[0].__dict__) # Copy the existing CRYPT attributes
|
||||
requires[0].min_length = 0 # But do not enforce minimum length for the old password
|
||||
|
||||
old_password = kwargs.get('old_password', '')
|
||||
new_password = kwargs.get('new_password', '')
|
||||
@@ -1012,7 +1031,7 @@ class AuthAPI(object):
|
||||
):
|
||||
"""
|
||||
Verify a given registration_key actually exists in the user table.
|
||||
Resets the key to empty string '' or 'pending' if
|
||||
Resets the key to empty string '' or 'pending' if
|
||||
setttings.registration_requires_approval is true.
|
||||
|
||||
Keyword Args:
|
||||
|
||||
@@ -18,7 +18,7 @@ import fnmatch
|
||||
import os
|
||||
import copy
|
||||
import random
|
||||
from gluon._compat import builtin, PY2, unicodeT, to_native, to_bytes, iteritems, basestring, reduce, xrange, long
|
||||
from gluon._compat import builtin, PY2, unicodeT, to_native, to_bytes, iteritems, basestring, reduce, xrange, long, reload
|
||||
from gluon.storage import Storage, List
|
||||
from gluon.template import parse_template
|
||||
from gluon.restricted import restricted, compile2
|
||||
@@ -41,11 +41,12 @@ import imp
|
||||
import logging
|
||||
import types
|
||||
from functools import reduce
|
||||
logger = logging.getLogger("web2py")
|
||||
from gluon import rewrite
|
||||
from gluon.custom_import import custom_import_install
|
||||
import py_compile
|
||||
|
||||
logger = logging.getLogger("web2py")
|
||||
|
||||
is_pypy = settings.global_settings.is_pypy
|
||||
is_gae = settings.global_settings.web2py_runtime_gae
|
||||
is_jython = settings.global_settings.is_jython
|
||||
@@ -111,7 +112,7 @@ class mybuiltin(object):
|
||||
NOTE could simple use a dict and populate it,
|
||||
NOTE not sure if this changes things though if monkey patching import.....
|
||||
"""
|
||||
#__builtins__
|
||||
# __builtins__
|
||||
def __getitem__(self, key):
|
||||
try:
|
||||
return getattr(builtin, key)
|
||||
@@ -185,7 +186,7 @@ def LOAD(c=None, f='index', args=None, vars=None,
|
||||
else:
|
||||
statement = "$.web2py.component('%s','%s');" % (url, target)
|
||||
attr['_data-w2p_remote'] = url
|
||||
if not target is None:
|
||||
if target is not None:
|
||||
return DIV(content, **attr)
|
||||
|
||||
else:
|
||||
@@ -204,14 +205,15 @@ def LOAD(c=None, f='index', args=None, vars=None,
|
||||
other_response = Response()
|
||||
other_request.env.path_info = '/' + \
|
||||
'/'.join([request.application, c, f] +
|
||||
map(str, other_request.args))
|
||||
[str(a) for a in other_request.args])
|
||||
other_request.env.query_string = \
|
||||
vars and URL(vars=vars).split('?')[1] or ''
|
||||
other_request.env.http_web2py_component_location = \
|
||||
request.env.path_info
|
||||
other_request.cid = target
|
||||
other_request.env.http_web2py_component_element = target
|
||||
other_request.restful = types.MethodType(request.restful.__func__, other_request) # A bit nasty but needed to use LOAD on action decorates with @request.restful()
|
||||
other_request.restful = types.MethodType(request.restful.__func__, other_request)
|
||||
# A bit nasty but needed to use LOAD on action decorates with @request.restful()
|
||||
other_response.view = '%s/%s.%s' % (c, f, other_request.extension)
|
||||
|
||||
other_environment = copy.copy(current.globalenv) # NASTY
|
||||
@@ -286,7 +288,7 @@ class LoadFactory(object):
|
||||
other_response = globals.Response()
|
||||
other_request.env.path_info = '/' + \
|
||||
'/'.join([request.application, c, f] +
|
||||
map(str, other_request.args))
|
||||
[str(a) for a in other_request.args])
|
||||
other_request.env.query_string = \
|
||||
vars and html.URL(vars=vars).split('?')[1] or ''
|
||||
other_request.env.http_web2py_component_location = \
|
||||
@@ -405,7 +407,7 @@ def build_environment(request, response, session, store_current=True):
|
||||
"""
|
||||
Build the environment dictionary into which web2py files are executed.
|
||||
"""
|
||||
#h,v = html,validators
|
||||
# h,v = html,validators
|
||||
environment = dict(_base_environment_)
|
||||
|
||||
if not request.env:
|
||||
@@ -418,7 +420,7 @@ def build_environment(request, response, session, store_current=True):
|
||||
r'^%s/%s/\w+\.py$' % (request.controller, request.function)
|
||||
]
|
||||
|
||||
t = environment['T'] = translator(os.path.join(request.folder,'languages'),
|
||||
t = environment['T'] = translator(os.path.join(request.folder, 'languages'),
|
||||
request.env.http_accept_language)
|
||||
c = environment['cache'] = Cache(request)
|
||||
|
||||
@@ -506,10 +508,12 @@ def compile_models(folder):
|
||||
save_pyc(filename)
|
||||
os.unlink(filename)
|
||||
|
||||
|
||||
def find_exposed_functions(data):
|
||||
data = regex_longcomments.sub('',data)
|
||||
data = regex_longcomments.sub('', data)
|
||||
return regex_expose.findall(data)
|
||||
|
||||
|
||||
def compile_controllers(folder):
|
||||
"""
|
||||
Compiles all the controllers in the application specified by `folder`
|
||||
@@ -524,16 +528,19 @@ def compile_controllers(folder):
|
||||
command = data + "\nresponse._vars=response._caller(%s)\n" % \
|
||||
function
|
||||
filename = pjoin(folder, 'compiled',
|
||||
'controllers.%s.%s.py' % (fname[:-3],function))
|
||||
'controllers.%s.%s.py' % (fname[:-3], function))
|
||||
write_file(filename, command)
|
||||
save_pyc(filename)
|
||||
os.unlink(filename)
|
||||
|
||||
|
||||
def model_cmp(a, b, sep='.'):
|
||||
return cmp(a.count(sep), b.count(sep)) or cmp(a, b)
|
||||
|
||||
|
||||
def model_cmp_sep(a, b, sep=os.path.sep):
|
||||
return model_cmp(a,b,sep)
|
||||
return model_cmp(a, b, sep)
|
||||
|
||||
|
||||
def run_models_in(environment):
|
||||
"""
|
||||
@@ -544,7 +551,7 @@ def run_models_in(environment):
|
||||
request = current.request
|
||||
folder = request.folder
|
||||
c = request.controller
|
||||
#f = environment['request'].function
|
||||
# f = environment['request'].function
|
||||
response = current.response
|
||||
|
||||
path = pjoin(folder, 'models')
|
||||
@@ -557,9 +564,11 @@ def run_models_in(environment):
|
||||
models = sorted(listdir(path, '^\w+\.py$', 0, sort=False), model_cmp_sep)
|
||||
else:
|
||||
if compiled:
|
||||
models = sorted(listdir(cpath, '^models[_.][\w.]+\.pyc$', 0), key=lambda f: '{0:03d}'.format(f.count('.')) + f)
|
||||
models = sorted(listdir(cpath, '^models[_.][\w.]+\.pyc$', 0),
|
||||
key=lambda f: '{0:03d}'.format(f.count('.')) + f)
|
||||
else:
|
||||
models = sorted(listdir(path, '^\w+\.py$', 0, sort=False), key=lambda f: '{0:03d}'.format(f.count(os.path.sep)) + f)
|
||||
models = sorted(listdir(path, '^\w+\.py$', 0, sort=False),
|
||||
key=lambda f: '{0:03d}'.format(f.count(os.path.sep)) + f)
|
||||
|
||||
models_to_run = None
|
||||
for model in models:
|
||||
@@ -570,10 +579,10 @@ def run_models_in(environment):
|
||||
if models_to_run:
|
||||
if compiled:
|
||||
n = len(cpath)+8
|
||||
fname = model[n:-4].replace('.','/')+'.py'
|
||||
fname = model[n:-4].replace('.', '/')+'.py'
|
||||
else:
|
||||
n = len(path)+1
|
||||
fname = model[n:].replace(os.path.sep,'/')
|
||||
fname = model[n:].replace(os.path.sep, '/')
|
||||
if not regex.search(fname) and c != 'appadmin':
|
||||
continue
|
||||
elif compiled:
|
||||
@@ -583,6 +592,7 @@ def run_models_in(environment):
|
||||
ccode = getcfs(model, model, f)
|
||||
restricted(ccode, environment, layer=model)
|
||||
|
||||
|
||||
def run_controller_in(controller, function, environment):
|
||||
"""
|
||||
Runs the controller.function() (for the app specified by
|
||||
@@ -596,13 +606,13 @@ def run_controller_in(controller, function, environment):
|
||||
badc = 'invalid controller (%s/%s)' % (controller, function)
|
||||
badf = 'invalid function (%s/%s)' % (controller, function)
|
||||
if os.path.exists(cpath):
|
||||
filename = pjoin(cpath, 'controllers.%s.%s.pyc'
|
||||
% (controller, function))
|
||||
if not os.path.exists(filename):
|
||||
filename = pjoin(cpath, 'controllers.%s.%s.pyc' % (controller, function))
|
||||
try:
|
||||
ccode = getcfs(filename, filename, lambda: read_pyc(filename))
|
||||
except IOError:
|
||||
raise HTTP(404,
|
||||
rewrite.THREAD_LOCAL.routes.error_message % badf,
|
||||
web2py_error=badf)
|
||||
ccode = getcfs(filename, filename, lambda: read_pyc(filename))
|
||||
elif function == '_TEST':
|
||||
# TESTING: adjust the path to include site packages
|
||||
from gluon.settings import global_settings
|
||||
@@ -623,15 +633,15 @@ def run_controller_in(controller, function, environment):
|
||||
code += TEST_CODE
|
||||
ccode = compile2(code, filename)
|
||||
else:
|
||||
filename = pjoin(folder, 'controllers/%s.py'
|
||||
% controller)
|
||||
if not os.path.exists(filename):
|
||||
filename = pjoin(folder, 'controllers/%s.py' % controller)
|
||||
try:
|
||||
code = getcfs(filename, filename, lambda: read_file(filename))
|
||||
except IOError:
|
||||
raise HTTP(404,
|
||||
rewrite.THREAD_LOCAL.routes.error_message % badc,
|
||||
web2py_error=badc)
|
||||
code = getcfs(filename, filename, lambda: read_file(filename))
|
||||
exposed = find_exposed_functions(code)
|
||||
if not function in exposed:
|
||||
if function not in exposed:
|
||||
raise HTTP(404,
|
||||
rewrite.THREAD_LOCAL.routes.error_message % badf,
|
||||
web2py_error=badf)
|
||||
@@ -666,8 +676,9 @@ def run_view_in(environment):
|
||||
badv = 'invalid view (%s)' % view
|
||||
patterns = response.get('generic_patterns')
|
||||
layer = None
|
||||
scode = None
|
||||
if patterns:
|
||||
regex = re_compile('|'.join(map(fnmatch.translate, patterns)))
|
||||
regex = re_compile('|'.join(fnmatch.translate(p) for p in patterns))
|
||||
short_action = '%(controller)s/%(function)s.%(extension)s' % request
|
||||
allow_generic = regex.search(short_action)
|
||||
else:
|
||||
@@ -678,7 +689,7 @@ def run_view_in(environment):
|
||||
layer = 'file stream'
|
||||
else:
|
||||
filename = pjoin(folder, 'views', view)
|
||||
if os.path.exists(cpath): # compiled views
|
||||
if os.path.exists(cpath): # compiled views
|
||||
x = view.replace('/', '.')
|
||||
files = ['views.%s.pyc' % x]
|
||||
is_compiled = os.path.exists(pjoin(cpath, files[0]))
|
||||
@@ -698,23 +709,27 @@ def run_view_in(environment):
|
||||
ccode = getcfs(compiled, compiled, lambda: read_pyc(compiled))
|
||||
layer = compiled
|
||||
break
|
||||
if not os.path.exists(filename) and allow_generic:
|
||||
view = 'generic.' + request.extension
|
||||
filename = pjoin(folder, 'views', view)
|
||||
if not os.path.exists(filename):
|
||||
raise HTTP(404,
|
||||
rewrite.THREAD_LOCAL.routes.error_message % badv,
|
||||
web2py_error=badv)
|
||||
layer = filename
|
||||
# Compile the template
|
||||
ccode = parse_template(view,
|
||||
pjoin(folder, 'views'),
|
||||
context=environment)
|
||||
|
||||
restricted(ccode, environment, layer=layer)
|
||||
# if the view is not compiled
|
||||
if not layer:
|
||||
if not os.path.exists(filename) and allow_generic:
|
||||
view = 'generic.' + request.extension
|
||||
filename = pjoin(folder, 'views', view)
|
||||
if not os.path.exists(filename):
|
||||
raise HTTP(404,
|
||||
rewrite.THREAD_LOCAL.routes.error_message % badv,
|
||||
web2py_error=badv)
|
||||
# Parse template
|
||||
scode = parse_template(view,
|
||||
pjoin(folder, 'views'),
|
||||
context=environment)
|
||||
# Compile template
|
||||
ccode = compile2(scode, filename)
|
||||
layer = filename
|
||||
restricted(ccode, environment, layer=layer, scode=scode)
|
||||
# parse_template saves everything in response body
|
||||
return environment['response'].body.getvalue()
|
||||
|
||||
|
||||
def remove_compiled_application(folder):
|
||||
"""
|
||||
Deletes the folder `compiled` containing the compiled application.
|
||||
|
||||
@@ -330,7 +330,7 @@ CONTENT_TYPE = {
|
||||
'.lha': 'application/x-lha',
|
||||
'.lhs': 'text/x-literate-haskell',
|
||||
'.lhz': 'application/x-lhz',
|
||||
'.load' : 'text/html',
|
||||
'.load': 'text/html',
|
||||
'.log': 'text/x-log',
|
||||
'.lrz': 'application/x-lrzip',
|
||||
'.ltx': 'text/x-tex',
|
||||
@@ -823,7 +823,7 @@ CONTENT_TYPE = {
|
||||
'.xsd': 'application/xml',
|
||||
'.xsl': 'application/xslt+xml',
|
||||
'.xslfo': 'text/x-xslfo',
|
||||
'.xslm' : 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
||||
'.xslm': 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
||||
'.xslt': 'application/xslt+xml',
|
||||
'.xspf': 'application/xspf+xml',
|
||||
'.xul': 'application/vnd.mozilla.xul+xml',
|
||||
@@ -843,7 +843,7 @@ def contenttype(filename, default='text/plain'):
|
||||
"""
|
||||
Returns the Content-Type string matching extension of the given filename.
|
||||
"""
|
||||
filename=to_native(filename)
|
||||
filename = to_native(filename)
|
||||
i = filename.rfind('.')
|
||||
if i >= 0:
|
||||
default = CONTENT_TYPE.get(filename[i:].lower(), default)
|
||||
|
||||
@@ -7,15 +7,13 @@ db = get_db()
|
||||
"""
|
||||
import os
|
||||
from gluon import *
|
||||
from pydal.adapters import ADAPTERS, PostgreSQLAdapter
|
||||
from pydal.helpers.classes import UseDatabaseStoredFile
|
||||
from pydal.adapters import adapters, PostgrePsyco
|
||||
from pydal.helpers.classes import DatabaseStoredFile
|
||||
|
||||
class HerokuPostgresAdapter(UseDatabaseStoredFile,PostgreSQLAdapter):
|
||||
drivers = ('psycopg2',)
|
||||
@adapters.register_for('postgres')
|
||||
class HerokuPostgresAdapter(DatabaseStoredFile, PostgrePsyco):
|
||||
uploads_in_blob = True
|
||||
|
||||
ADAPTERS['postgres'] = HerokuPostgresAdapter
|
||||
|
||||
def get_db(name = None, pool_size=10):
|
||||
if not name:
|
||||
names = [n for n in os.environ.keys()
|
||||
|
||||
@@ -45,7 +45,7 @@ class RESIZE(object):
|
||||
background = Image.new('RGBA', (self.nx, self.ny), (255, 255, 255, 0))
|
||||
background.paste(
|
||||
img,
|
||||
((self.nx - img.size[0]) / 2, (self.ny - img.size[1]) / 2))
|
||||
((self.nx - img.size[0]) // 2, (self.ny - img.size[1]) // 2))
|
||||
background.save(s, 'JPEG', quality=self.quality)
|
||||
else:
|
||||
img.save(s, 'JPEG', quality=self.quality)
|
||||
|
||||
@@ -49,7 +49,8 @@ class CasAuth(object):
|
||||
email=lambda v: v.get('email', None),
|
||||
user_id=lambda v: v['user']),
|
||||
casversion=1,
|
||||
casusername='cas:user'
|
||||
casusername='cas:user',
|
||||
change_password_url=None
|
||||
):
|
||||
self.urlbase = urlbase
|
||||
self.cas_login_url = "%s/%s" % (self.urlbase, actions[0])
|
||||
@@ -64,6 +65,9 @@ class CasAuth(object):
|
||||
#vars=current.request.vars,
|
||||
scheme=True)
|
||||
|
||||
# URL to let users change their password in the IDP system
|
||||
self.cas_change_password_url = change_password_url
|
||||
|
||||
def login_url(self, next="/"):
|
||||
current.session.token = self._CAS_login()
|
||||
return next
|
||||
@@ -74,6 +78,10 @@ class CasAuth(object):
|
||||
self._CAS_logout()
|
||||
return next
|
||||
|
||||
def change_password_url(self, next="/"):
|
||||
self._CAS_change_password()
|
||||
return next
|
||||
|
||||
def get_user(self):
|
||||
user = current.session.token
|
||||
if user:
|
||||
@@ -135,3 +143,6 @@ class CasAuth(object):
|
||||
redirects to the CAS logout page
|
||||
"""
|
||||
redirect("%s?service=%s" % (self.cas_logout_url, self.cas_my_url))
|
||||
|
||||
def _CAS_change_password(self):
|
||||
redirect(self.cas_change_password_url)
|
||||
|
||||
@@ -78,10 +78,13 @@ class RPXAccount(object):
|
||||
|
||||
def get_user(self):
|
||||
request = self.request
|
||||
if request.vars.token:
|
||||
# Janrain now sends the token via both a POST body and the query
|
||||
# string, so we should keep only one of these.
|
||||
token = request.post_vars.token or request.get_vars.token
|
||||
if token:
|
||||
user = Storage()
|
||||
data = urllib.urlencode(
|
||||
dict(apiKey=self.api_key, token=request.vars.token))
|
||||
dict(apiKey=self.api_key, token=token))
|
||||
auth_info_json = fetch(self.auth_url + '?' + data)
|
||||
auth_info = json.loads(auth_info_json)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ try:
|
||||
import ldap.filter
|
||||
ldap.set_option(ldap.OPT_REFERRALS, 0)
|
||||
except Exception as e:
|
||||
logging.error('missing ldap, try "easy_install python-ldap"')
|
||||
logging.error('missing ldap, try "pip install python-ldap"')
|
||||
raise e
|
||||
|
||||
|
||||
@@ -169,16 +169,10 @@ def ldap_auth(server='ldap',
|
||||
You can set the logging level with the "logging_level" parameter, default
|
||||
is "error" and can be set to error, warning, info, debug.
|
||||
"""
|
||||
|
||||
if self_signed_certificate:
|
||||
# NOTE : If you have a self-signed SSL Certificate pointing over "port=686" and "secure=True" alone
|
||||
# will not work, you need also to set "self_signed_certificate=True".
|
||||
# Ref1: https://onemoretech.wordpress.com/2015/06/25/connecting-to-ldap-over-self-signed-tls-with-python/
|
||||
# Ref2: http://bneijt.nl/blog/post/connecting-to-ldaps-with-self-signed-cert-using-python/
|
||||
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
||||
|
||||
logger = logging.getLogger('web2py.auth.ldap_auth')
|
||||
if logging_level == 'error':
|
||||
if isinstance(logging_level, int):
|
||||
logger.setLevel(logging_level)
|
||||
elif logging_level == 'error':
|
||||
logger.setLevel(logging.ERROR)
|
||||
elif logging_level == 'warning':
|
||||
logger.setLevel(logging.WARNING)
|
||||
@@ -406,17 +400,25 @@ def ldap_auth(server='ldap',
|
||||
if manage_user:
|
||||
logger.info('[%s] Manage user data' % str(username))
|
||||
try:
|
||||
user_firstname = result[user_firstname_attrib][0]
|
||||
if user_firstname_part is not None:
|
||||
store_user_firstname = result[user_firstname_attrib][0].split(' ', 1)[user_firstname_part]
|
||||
store_user_firstname = user_firstname.split(
|
||||
b' ' if isinstance(user_firstname, bytes) else ' ',
|
||||
1
|
||||
)[user_firstname_part]
|
||||
else:
|
||||
store_user_firstname = result[user_firstname_attrib][0]
|
||||
store_user_firstname = user_firstname
|
||||
except KeyError as e:
|
||||
store_user_firstname = None
|
||||
try:
|
||||
user_lastname = result[user_lastname_attrib][0]
|
||||
if user_lastname_part is not None:
|
||||
store_user_lastname = result[user_lastname_attrib][0].split(' ', 1)[user_lastname_part]
|
||||
store_user_lastname = user_lastname.split(
|
||||
b' ' if isinstance(user_lastname, bytes) else ' ',
|
||||
1
|
||||
)[user_lastname_part]
|
||||
else:
|
||||
store_user_lastname = result[user_lastname_attrib][0]
|
||||
store_user_lastname = user_lastname
|
||||
except KeyError as e:
|
||||
store_user_lastname = None
|
||||
try:
|
||||
@@ -601,7 +603,14 @@ def ldap_auth(server='ldap',
|
||||
if secure:
|
||||
if not ldap_port:
|
||||
ldap_port = 636
|
||||
|
||||
|
||||
if self_signed_certificate:
|
||||
# NOTE : If you have a self-signed SSL Certificate pointing over "port=686" and "secure=True" alone
|
||||
# will not work, you need also to set "self_signed_certificate=True".
|
||||
# Ref1: https://onemoretech.wordpress.com/2015/06/25/connecting-to-ldap-over-self-signed-tls-with-python/
|
||||
# Ref2: http://bneijt.nl/blog/post/connecting-to-ldaps-with-self-signed-cert-using-python/
|
||||
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
||||
|
||||
if cacert_path:
|
||||
ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, cacert_path)
|
||||
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
|
||||
import os
|
||||
import re
|
||||
import urllib
|
||||
from gluon import *
|
||||
from gluon.tools import fetch
|
||||
from gluon.storage import Storage
|
||||
import json
|
||||
|
||||
from gluon._compat import urlencode
|
||||
|
||||
class RPXAccount(object):
|
||||
|
||||
@@ -78,10 +77,13 @@ class RPXAccount(object):
|
||||
|
||||
def get_user(self):
|
||||
request = self.request
|
||||
if request.vars.token:
|
||||
# Janrain now sends the token via both a POST body and the query
|
||||
# string, so we should keep only one of these.
|
||||
token = request.post_vars.token or request.get_vars.token
|
||||
if token:
|
||||
user = Storage()
|
||||
data = urllib.urlencode(
|
||||
dict(apiKey=self.api_key, token=request.vars.token))
|
||||
data = urlencode(
|
||||
dict(apiKey=self.api_key, token=token))
|
||||
auth_info_json = fetch(self.auth_url + '?' + data)
|
||||
auth_info = json.loads(auth_info_json)
|
||||
|
||||
|
||||
@@ -104,11 +104,12 @@ def obj2dict(obj, processed=None):
|
||||
types.BuiltinFunctionType,
|
||||
types.BuiltinMethodType))
|
||||
|
||||
def saml2_handler(session, request, config_filename = None):
|
||||
def saml2_handler(session, request, config_filename = None, entityid = None):
|
||||
config_filename = config_filename or os.path.join(request.folder,'private','sp_conf')
|
||||
client = Saml2Client(config_file = config_filename)
|
||||
idps = client.metadata.with_descriptor("idpsso")
|
||||
entityid = idps.keys()[0]
|
||||
if not entityid:
|
||||
idps = client.metadata.with_descriptor("idpsso")
|
||||
entityid = idps.keys()[0]
|
||||
bindings = [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST]
|
||||
binding, destination = client.pick_binding(
|
||||
"single_sign_on_service", bindings, "idpsso", entity_id=entityid)
|
||||
@@ -119,7 +120,7 @@ def saml2_handler(session, request, config_filename = None):
|
||||
if not request.vars.SAMLResponse:
|
||||
req_id, req = client.create_authn_request(destination, binding=binding)
|
||||
relay_state = web2py_uuid().replace('-','')
|
||||
session.saml_outstanding_queries = {req_id: request.url}
|
||||
session.saml_outstanding_queries = {req_id: request.url}
|
||||
session.saml_req_id = req_id
|
||||
http_args = client.apply_binding(binding, str(req), destination,
|
||||
relay_state=relay_state)
|
||||
@@ -145,12 +146,21 @@ class Saml2Auth(object):
|
||||
username=lambda v:v['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn'][0],
|
||||
email=lambda v:v['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn'][0],
|
||||
user_id=lambda v:v['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn'][0],
|
||||
)):
|
||||
), logout_url=None, change_password_url=None, entityid=None):
|
||||
self.config_file = config_file
|
||||
self.maps = maps
|
||||
|
||||
# URL for redirecting users to when they sign out
|
||||
self.saml_logout_url = logout_url
|
||||
|
||||
# URL to let users change their password in the IDP system
|
||||
self.saml_change_password_url = change_password_url
|
||||
|
||||
# URL to specify an IDP if using federation metadata or an MDQ
|
||||
self.entityid = entityid
|
||||
|
||||
def login_url(self, next="/"):
|
||||
d = saml2_handler(current.session, current.request)
|
||||
d = saml2_handler(current.session, current.request, entityid=self.entityid)
|
||||
if 'url' in d:
|
||||
redirect(d['url'])
|
||||
elif 'error' in d:
|
||||
@@ -170,6 +180,12 @@ class Saml2Auth(object):
|
||||
|
||||
def logout_url(self, next="/"):
|
||||
current.session.saml2_info = None
|
||||
current.session.auth = None
|
||||
self._SAML_logout()
|
||||
return next
|
||||
|
||||
def change_password_url(self, next="/"):
|
||||
self._SAML_change_password()
|
||||
return next
|
||||
|
||||
def get_user(self):
|
||||
@@ -180,3 +196,13 @@ class Saml2Auth(object):
|
||||
d[key] = self.maps[key](user)
|
||||
return d
|
||||
return None
|
||||
|
||||
def _SAML_logout(self):
|
||||
"""
|
||||
exposed SAML.logout()
|
||||
redirects to the SAML logout page
|
||||
"""
|
||||
redirect(self.saml_logout_url)
|
||||
|
||||
def _SAML_change_password(self):
|
||||
redirect(self.saml_change_password_url)
|
||||
|
||||
@@ -5,12 +5,19 @@
|
||||
# license MIT/BSD/GPL
|
||||
from __future__ import print_function
|
||||
import re
|
||||
import sys
|
||||
import urllib
|
||||
from gluon._compat import maketrans, urllib_quote, unicodeT, to_bytes, to_native, xrange
|
||||
from gluon.utils import local_html_escape as escape
|
||||
from ast import parse as ast_parse
|
||||
import ast
|
||||
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
||||
if PY2:
|
||||
from urllib import quote as urllib_quote
|
||||
from string import maketrans
|
||||
else:
|
||||
from urllib.parse import quote as urllib_quote
|
||||
maketrans = str.maketrans
|
||||
|
||||
|
||||
"""
|
||||
TODO: next version should use MathJax
|
||||
@@ -564,6 +571,29 @@ ttab_in = maketrans("'`:*~\\[]{}@$+-.#\n", '\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14
|
||||
ttab_out = maketrans('\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x05', "'`:*~\\[]{}@$+-.#\n")
|
||||
regex_quote = re.compile('(?P<name>\w+?)\s*\=\s*')
|
||||
|
||||
def local_html_escape(data, quote=False):
|
||||
"""
|
||||
Works with bytes.
|
||||
Replace special characters "&", "<" and ">" to HTML-safe sequences.
|
||||
If the optional flag quote is true (the default), the quotation mark
|
||||
characters, both double quote (") and single quote (') characters are also
|
||||
translated.
|
||||
"""
|
||||
if PY2:
|
||||
import cgi
|
||||
data = cgi.escape(data, quote)
|
||||
return data.replace("'", "'") if quote else data
|
||||
else:
|
||||
import html
|
||||
if isinstance(data, str):
|
||||
return html.escape(data, quote=quote)
|
||||
data = data.replace(b"&", b"&") # Must be done first!
|
||||
data = data.replace(b"<", b"<")
|
||||
data = data.replace(b">", b">")
|
||||
if quote:
|
||||
data = data.replace(b'"', b""")
|
||||
data = data.replace(b'\'', b"'")
|
||||
return data
|
||||
|
||||
def make_dict(b):
|
||||
return '{%s}' % regex_quote.sub("'\g<name>':", b)
|
||||
@@ -579,7 +609,7 @@ def safe_eval(node_or_string, env):
|
||||
_safe_names = {'None': None, 'True': True, 'False': False}
|
||||
_safe_names.update(env)
|
||||
if isinstance(node_or_string, basestring):
|
||||
node_or_string = ast_parse(node_or_string, mode='eval')
|
||||
node_or_string = ast.parse(node_or_string, mode='eval')
|
||||
if isinstance(node_or_string, ast.Expression):
|
||||
node_or_string = node_or_string.body
|
||||
|
||||
@@ -599,14 +629,14 @@ def safe_eval(node_or_string, env):
|
||||
if node.id in _safe_names:
|
||||
return _safe_names[node.id]
|
||||
elif isinstance(node, ast.BinOp) and \
|
||||
isinstance(node.op, (Add, Sub)) and \
|
||||
isinstance(node.right, Num) and \
|
||||
isinstance(node.op, (ast.Add, ast.Sub)) and \
|
||||
isinstance(node.right, ast.Num) and \
|
||||
isinstance(node.right.n, complex) and \
|
||||
isinstance(node.left, Num) and \
|
||||
isinstance(node.left, ast.Num) and \
|
||||
isinstance(node.left.n, (int, long, float)):
|
||||
left = node.left.n
|
||||
right = node.right.n
|
||||
if isinstance(node.op, Add):
|
||||
if isinstance(node.op, ast.Add):
|
||||
return left + right
|
||||
else:
|
||||
return left - right
|
||||
@@ -765,7 +795,7 @@ def render(text,
|
||||
'<table><tbody><tr class="first"><td>a</td><td>b</td></tr><tr class="even"><td>c</td><td>d</td></tr></tbody></table>'
|
||||
|
||||
>>> render("----\\nhello world\\n----\\n")
|
||||
'<blockquote>hello world</blockquote>'
|
||||
'<blockquote><p>hello world</p></blockquote>'
|
||||
|
||||
>>> render('[[myanchor]]')
|
||||
'<p><span class="anchor" id="markmin_myanchor"></span></p>'
|
||||
@@ -946,7 +976,8 @@ def render(text,
|
||||
if protolinks == "default":
|
||||
protolinks = protolinks_simple
|
||||
pp = '\n' if pretty_print else ''
|
||||
text = to_native(text)
|
||||
text = text if text is None or isinstance(text, str) else text.decode('utf8', 'strict')
|
||||
|
||||
if not (isinstance(text, str)):
|
||||
text = str(text or '')
|
||||
text = regex_backslash.sub(lambda m: m.group(1).translate(ttab_in), text)
|
||||
@@ -994,7 +1025,7 @@ def render(text,
|
||||
return LINK
|
||||
|
||||
text = regex_link.sub(mark_link, text)
|
||||
text = escape(text)
|
||||
text = local_html_escape(text)
|
||||
|
||||
if protolinks:
|
||||
text = regex_proto.sub(lambda m: protolinks(*m.group('p', 'k')), text)
|
||||
@@ -1035,7 +1066,7 @@ def render(text,
|
||||
if pend and mtag == '.': # paragraph in a list:
|
||||
out.append(etags.pop())
|
||||
ltags.pop()
|
||||
for i in xrange(lent - lev):
|
||||
for i in range(lent - lev):
|
||||
out.append('<' + tag + '>' + pp)
|
||||
etags.append('</' + tag + '>' + pp)
|
||||
lev += 1
|
||||
@@ -1044,7 +1075,7 @@ def render(text,
|
||||
elif lent == lev:
|
||||
if tlev[-1] != tag:
|
||||
# type of list is changed (ul<=>ol):
|
||||
for i in xrange(ltags.count(lent)):
|
||||
for i in range(ltags.count(lent)):
|
||||
ltags.pop()
|
||||
out.append(etags.pop())
|
||||
tlev[-1] = tag
|
||||
@@ -1209,7 +1240,7 @@ def render(text,
|
||||
s = '<blockquote%s%s>%s</blockquote>%s' \
|
||||
% (t_cls,
|
||||
t_id,
|
||||
'\n'.join(strings[bq_begin:lineno]), pp)
|
||||
render('\n'.join(strings[bq_begin:lineno])), pp)
|
||||
mtag = 'q'
|
||||
else:
|
||||
s = '<hr />'
|
||||
@@ -1322,10 +1353,10 @@ def render(text,
|
||||
t, a, k, p, w = m.group('t', 'a', 'k', 'p', 'w')
|
||||
if not k:
|
||||
return m.group(0)
|
||||
k = escape(k)
|
||||
k = local_html_escape(k)
|
||||
t = t or ''
|
||||
style = 'width:%s' % w if w else ''
|
||||
title = ' title="%s"' % escape(a).replace(META, DISABLED_META) if a else ''
|
||||
title = ' title="%s"' % local_html_escape(a).replace(META, DISABLED_META) if a else ''
|
||||
p_begin = p_end = ''
|
||||
if p == 'center':
|
||||
p_begin = '<p style="text-align:center">'
|
||||
@@ -1349,7 +1380,7 @@ def render(text,
|
||||
autolinks, protolinks, class_prefix, id_prefix, pretty_print)
|
||||
return '<%(p)s controls="controls"%(title)s%(style)s><source src="%(k)s" />%(t)s</%(p)s>' \
|
||||
% dict(p=p, title=title, style=style, k=k, t=t)
|
||||
alt = ' alt="%s"' % escape(t).replace(META, DISABLED_META) if t else ''
|
||||
alt = ' alt="%s"' % local_html_escape(t).replace(META, DISABLED_META) if t else ''
|
||||
return '%(begin)s<img src="%(k)s"%(alt)s%(title)s%(style)s />%(end)s' \
|
||||
% dict(begin=p_begin, k=k, alt=alt, title=title, style=style, end=p_end)
|
||||
|
||||
@@ -1358,12 +1389,12 @@ def render(text,
|
||||
if not k and not t:
|
||||
return m.group(0)
|
||||
t = t or ''
|
||||
a = escape(a) if a else ''
|
||||
a = local_html_escape(a) if a else ''
|
||||
if k:
|
||||
if '#' in k and ':' not in k.split('#')[0]:
|
||||
# wikipage, not external url
|
||||
k = k.replace('#', '#' + id_prefix)
|
||||
k = escape(k)
|
||||
k = local_html_escape(k)
|
||||
title = ' title="%s"' % a.replace(META, DISABLED_META) if a else ''
|
||||
target = ' target="_blank"' if p == 'popup' else ''
|
||||
t = render(t, {}, {}, 'br', URL, environment, latex, None,
|
||||
@@ -1373,7 +1404,7 @@ def render(text,
|
||||
if t == 'NEWLINE' and not a:
|
||||
return '<br />' + pp
|
||||
return '<span class="anchor" id="%s">%s</span>' % (
|
||||
escape(id_prefix + t),
|
||||
local_html_escape(id_prefix + t),
|
||||
render(a, {}, {}, 'br', URL,
|
||||
environment, latex, autolinks,
|
||||
protolinks, class_prefix,
|
||||
@@ -1399,7 +1430,7 @@ def render(text,
|
||||
def expand_meta(m):
|
||||
code, b, p, s = segments.pop(0)
|
||||
if code is None or m.group() == DISABLED_META:
|
||||
return escape(s)
|
||||
return local_html_escape(s)
|
||||
if b in extra:
|
||||
if code[:1] == '\n':
|
||||
code = code[1:]
|
||||
@@ -1411,7 +1442,7 @@ def render(text,
|
||||
return str(extra[b](code))
|
||||
elif b == 'cite':
|
||||
return '[' + ','.join('<a href="#%s" class="%s">%s</a>' %
|
||||
(id_prefix + d, b, d) for d in escape(code).split(',')) + ']'
|
||||
(id_prefix + d, b, d) for d in local_html_escape(code).split(',')) + ']'
|
||||
elif b == 'latex':
|
||||
return LATEX % urllib_quote(code)
|
||||
elif b in html_colors:
|
||||
@@ -1426,12 +1457,12 @@ def render(text,
|
||||
% (fg, bg, render(code, {}, {}, 'br', URL, environment, latex,
|
||||
autolinks, protolinks, class_prefix, id_prefix, pretty_print))
|
||||
cls = ' class="%s%s"' % (class_prefix, b) if b and b != 'id' else ''
|
||||
id = ' id="%s%s"' % (id_prefix, escape(p)) if p else ''
|
||||
id = ' id="%s%s"' % (id_prefix, local_html_escape(p)) if p else ''
|
||||
beg = (code[:1] == '\n')
|
||||
end = [None, -1][code[-1:] == '\n']
|
||||
if beg and end:
|
||||
return '<pre><code%s%s>%s</code></pre>%s' % (cls, id, escape(code[1:-1]), pp)
|
||||
return '<code%s%s>%s</code>' % (cls, id, escape(code[beg:end]))
|
||||
return '<pre><code%s%s>%s</code></pre>%s' % (cls, id, local_html_escape(code[1:-1]), pp)
|
||||
return '<code%s%s>%s</code>' % (cls, id, local_html_escape(code[beg:end]))
|
||||
|
||||
text = regex_expand_meta.sub(expand_meta, text)
|
||||
|
||||
|
||||
@@ -10,8 +10,11 @@ Original author: Zachary Voase
|
||||
Modified for inclusion into web2py by: Ross Peoples <ross.peoples@gmail.com>
|
||||
"""
|
||||
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
from io import StringIO
|
||||
|
||||
from StringIO import StringIO # The pure-Python StringIO supports unicode.
|
||||
import re
|
||||
|
||||
|
||||
|
||||
@@ -8,30 +8,40 @@ Created by: Ross Peoples <ross.peoples@gmail.com>
|
||||
Modified by: Massimo Di Pierro <massimo.dipierro@gmail.com>
|
||||
"""
|
||||
|
||||
import cssmin
|
||||
import jsmin
|
||||
from . import cssmin
|
||||
from . import jsmin
|
||||
import os
|
||||
import hashlib
|
||||
import re
|
||||
import sys
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
||||
if PY2:
|
||||
hashlib_md5 = hashlib.md5
|
||||
else:
|
||||
hashlib_md5 = lambda s: hashlib.md5(bytes(s, 'utf8'))
|
||||
|
||||
def open_py23(filename, mode):
|
||||
if PY2:
|
||||
f = open(filename, mode + 'b')
|
||||
else:
|
||||
f = open(filename, mode, encoding="utf8")
|
||||
return f
|
||||
|
||||
def read_binary_file(filename):
|
||||
f = open(filename, 'rb')
|
||||
f = open_py23(filename, 'r')
|
||||
data = f.read()
|
||||
f.close()
|
||||
return data
|
||||
|
||||
|
||||
def write_binary_file(filename, data):
|
||||
f = open(filename, 'wb')
|
||||
f = open_py23(filename, 'w')
|
||||
f.write(data)
|
||||
f.close()
|
||||
|
||||
|
||||
def fix_links(css, static_path):
|
||||
return re.sub(r'url\((["\'])\.\./', 'url(\\1' + static_path, css)
|
||||
|
||||
|
||||
def minify(files, path_info, folder, optimize_css, optimize_js,
|
||||
ignore_concat=[],
|
||||
ignore_minify=['/jquery.js', '/anytime.js']):
|
||||
@@ -109,7 +119,7 @@ def minify(files, path_info, folder, optimize_css, optimize_js,
|
||||
js.append(contents)
|
||||
else:
|
||||
js.append(filename)
|
||||
dest_key = hashlib.md5(repr(processed)).hexdigest()
|
||||
dest_key = hashlib_md5(repr(processed)).hexdigest()
|
||||
if css and concat_css:
|
||||
css = '\n\n'.join(contents for contents in css)
|
||||
if not inline_css:
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
from .core import (
|
||||
Warning, Bytea, DataError, DatabaseError, InterfaceError, ProgrammingError,
|
||||
Error, OperationalError, IntegrityError, InternalError, NotSupportedError,
|
||||
ArrayContentNotHomogenousError, ArrayContentEmptyError,
|
||||
ArrayDimensionsNotConsistentError, ArrayContentNotSupportedError, utc,
|
||||
Connection, Cursor, Binary, Date, DateFromTicks, Time, TimeFromTicks,
|
||||
Timestamp, TimestampFromTicks, BINARY, Interval)
|
||||
from ._version import get_versions
|
||||
__version__ = get_versions()['version']
|
||||
del get_versions
|
||||
|
||||
# Copyright (c) 2007-2009, Mathieu Fenniak
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
__author__ = "Mathieu Fenniak"
|
||||
|
||||
|
||||
def connect(
|
||||
user=None, host='localhost', unix_sock=None, port=5432, database=None,
|
||||
password=None, ssl=False, timeout=None, **kwargs):
|
||||
"""Creates a connection to a PostgreSQL database.
|
||||
|
||||
This function is part of the `DBAPI 2.0 specification
|
||||
<http://www.python.org/dev/peps/pep-0249/>`_; however, the arguments of the
|
||||
function are not defined by the specification.
|
||||
|
||||
:param user:
|
||||
The username to connect to the PostgreSQL server with.
|
||||
|
||||
If your server character encoding is not ``ascii`` or ``utf8``, then
|
||||
you need to provide ``user`` as bytes, eg.
|
||||
``"my_name".encode('EUC-JP')``.
|
||||
|
||||
:keyword host:
|
||||
The hostname of the PostgreSQL server to connect with. Providing this
|
||||
parameter is necessary for TCP/IP connections. One of either ``host``
|
||||
or ``unix_sock`` must be provided. The default is ``localhost``.
|
||||
|
||||
:keyword unix_sock:
|
||||
The path to the UNIX socket to access the database through, for
|
||||
example, ``'/tmp/.s.PGSQL.5432'``. One of either ``host`` or
|
||||
``unix_sock`` must be provided.
|
||||
|
||||
:keyword port:
|
||||
The TCP/IP port of the PostgreSQL server instance. This parameter
|
||||
defaults to ``5432``, the registered common port of PostgreSQL TCP/IP
|
||||
servers.
|
||||
|
||||
:keyword database:
|
||||
The name of the database instance to connect with. This parameter is
|
||||
optional; if omitted, the PostgreSQL server will assume the database
|
||||
name is the same as the username.
|
||||
|
||||
If your server character encoding is not ``ascii`` or ``utf8``, then
|
||||
you need to provide ``database`` as bytes, eg.
|
||||
``"my_db".encode('EUC-JP')``.
|
||||
|
||||
:keyword password:
|
||||
The user password to connect to the server with. This parameter is
|
||||
optional; if omitted and the database server requests password-based
|
||||
authentication, the connection will fail to open. If this parameter
|
||||
is provided but not requested by the server, no error will occur.
|
||||
|
||||
If your server character encoding is not ``ascii`` or ``utf8``, then
|
||||
you need to provide ``user`` as bytes, eg.
|
||||
``"my_password".encode('EUC-JP')``.
|
||||
|
||||
:keyword ssl:
|
||||
Use SSL encryption for TCP/IP sockets if ``True``. Defaults to
|
||||
``False``.
|
||||
|
||||
:keyword timeout:
|
||||
Only used with Python 3, this is the time in seconds before the
|
||||
connection to the database will time out. The default is ``None`` which
|
||||
means no timeout.
|
||||
|
||||
:rtype:
|
||||
A :class:`Connection` object.
|
||||
"""
|
||||
return Connection(
|
||||
user, host, unix_sock, port, database, password, ssl, timeout)
|
||||
|
||||
apilevel = "2.0"
|
||||
"""The DBAPI level supported, currently "2.0".
|
||||
|
||||
This property is part of the `DBAPI 2.0 specification
|
||||
<http://www.python.org/dev/peps/pep-0249/>`_.
|
||||
"""
|
||||
|
||||
threadsafety = 3
|
||||
"""Integer constant stating the level of thread safety the DBAPI interface
|
||||
supports. This DBAPI module supports sharing the module, connections, and
|
||||
cursors, resulting in a threadsafety value of 3.
|
||||
|
||||
This property is part of the `DBAPI 2.0 specification
|
||||
<http://www.python.org/dev/peps/pep-0249/>`_.
|
||||
"""
|
||||
|
||||
paramstyle = 'format'
|
||||
"""String property stating the type of parameter marker formatting expected by
|
||||
the interface. This value defaults to "format", in which parameters are
|
||||
marked in this format: "WHERE name=%s".
|
||||
|
||||
This property is part of the `DBAPI 2.0 specification
|
||||
<http://www.python.org/dev/peps/pep-0249/>`_.
|
||||
|
||||
As an extension to the DBAPI specification, this value is not constant; it
|
||||
can be changed to any of the following values:
|
||||
|
||||
qmark
|
||||
Question mark style, eg. ``WHERE name=?``
|
||||
numeric
|
||||
Numeric positional style, eg. ``WHERE name=:1``
|
||||
named
|
||||
Named style, eg. ``WHERE name=:paramname``
|
||||
format
|
||||
printf format codes, eg. ``WHERE name=%s``
|
||||
pyformat
|
||||
Python format codes, eg. ``WHERE name=%(paramname)s``
|
||||
"""
|
||||
|
||||
# I have no idea what this would be used for by a client app. Should it be
|
||||
# TEXT, VARCHAR, CHAR? It will only compare against row_description's
|
||||
# type_code if it is this one type. It is the varchar type oid for now, this
|
||||
# appears to match expectations in the DB API 2.0 compliance test suite.
|
||||
|
||||
STRING = 1043
|
||||
"""String type oid."""
|
||||
|
||||
|
||||
NUMBER = 1700
|
||||
"""Numeric type oid"""
|
||||
|
||||
DATETIME = 1114
|
||||
"""Timestamp type oid"""
|
||||
|
||||
ROWID = 26
|
||||
"""ROWID type oid"""
|
||||
|
||||
__all__ = [
|
||||
Warning, Bytea, DataError, DatabaseError, connect, InterfaceError,
|
||||
ProgrammingError, Error, OperationalError, IntegrityError, InternalError,
|
||||
NotSupportedError, ArrayContentNotHomogenousError, ArrayContentEmptyError,
|
||||
ArrayDimensionsNotConsistentError, ArrayContentNotSupportedError, utc,
|
||||
Connection, Cursor, Binary, Date, DateFromTicks, Time, TimeFromTicks,
|
||||
Timestamp, TimestampFromTicks, BINARY, Interval]
|
||||
|
||||
"""Version string for pg8000.
|
||||
|
||||
.. versionadded:: 1.9.11
|
||||
"""
|
||||
@@ -1,460 +0,0 @@
|
||||
|
||||
# This file helps to compute a version number in source trees obtained from
|
||||
# git-archive tarball (such as those provided by githubs download-from-tag
|
||||
# feature). Distribution tarballs (built by setup.py sdist) and build
|
||||
# directories (produced by setup.py build) will contain a much shorter file
|
||||
# that just contains the computed version number.
|
||||
|
||||
# This file is released into the public domain. Generated by
|
||||
# versioneer-0.15 (https://github.com/warner/python-versioneer)
|
||||
|
||||
import errno
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def get_keywords():
|
||||
# these strings will be replaced by git during git-archive.
|
||||
# setup.py/versioneer.py will grep for the variable names, so they must
|
||||
# each be defined on a line of their own. _version.py will just call
|
||||
# get_keywords().
|
||||
git_refnames = " (tag: 1.10.6)"
|
||||
git_full = "4098abf6be90683ab10b7b080983ed6f08476485"
|
||||
keywords = {"refnames": git_refnames, "full": git_full}
|
||||
return keywords
|
||||
|
||||
|
||||
class VersioneerConfig:
|
||||
pass
|
||||
|
||||
|
||||
def get_config():
|
||||
# these strings are filled in when 'setup.py versioneer' creates
|
||||
# _version.py
|
||||
cfg = VersioneerConfig()
|
||||
cfg.VCS = "git"
|
||||
cfg.style = "pep440"
|
||||
cfg.tag_prefix = ""
|
||||
cfg.parentdir_prefix = "pg8000-"
|
||||
cfg.versionfile_source = "pg8000/_version.py"
|
||||
cfg.verbose = False
|
||||
return cfg
|
||||
|
||||
|
||||
class NotThisMethod(Exception):
|
||||
pass
|
||||
|
||||
|
||||
LONG_VERSION_PY = {}
|
||||
HANDLERS = {}
|
||||
|
||||
|
||||
def register_vcs_handler(vcs, method): # decorator
|
||||
def decorate(f):
|
||||
if vcs not in HANDLERS:
|
||||
HANDLERS[vcs] = {}
|
||||
HANDLERS[vcs][method] = f
|
||||
return f
|
||||
return decorate
|
||||
|
||||
|
||||
def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
|
||||
assert isinstance(commands, list)
|
||||
p = None
|
||||
for c in commands:
|
||||
try:
|
||||
dispcmd = str([c] + args)
|
||||
# remember shell=False, so use git.cmd on windows, not just git
|
||||
p = subprocess.Popen([c] + args, cwd=cwd, stdout=subprocess.PIPE,
|
||||
stderr=(subprocess.PIPE if hide_stderr
|
||||
else None))
|
||||
break
|
||||
except EnvironmentError:
|
||||
e = sys.exc_info()[1]
|
||||
if e.errno == errno.ENOENT:
|
||||
continue
|
||||
if verbose:
|
||||
print("unable to run %s" % dispcmd)
|
||||
print(e)
|
||||
return None
|
||||
else:
|
||||
if verbose:
|
||||
print("unable to find command, tried %s" % (commands,))
|
||||
return None
|
||||
stdout = p.communicate()[0].strip()
|
||||
if sys.version_info[0] >= 3:
|
||||
stdout = stdout.decode()
|
||||
if p.returncode != 0:
|
||||
if verbose:
|
||||
print("unable to run %s (error)" % dispcmd)
|
||||
return None
|
||||
return stdout
|
||||
|
||||
|
||||
def versions_from_parentdir(parentdir_prefix, root, verbose):
|
||||
# Source tarballs conventionally unpack into a directory that includes
|
||||
# both the project name and a version string.
|
||||
dirname = os.path.basename(root)
|
||||
if not dirname.startswith(parentdir_prefix):
|
||||
if verbose:
|
||||
print("guessing rootdir is '%s', but '%s' doesn't start with "
|
||||
"prefix '%s'" % (root, dirname, parentdir_prefix))
|
||||
raise NotThisMethod("rootdir doesn't start with parentdir_prefix")
|
||||
return {"version": dirname[len(parentdir_prefix):],
|
||||
"full-revisionid": None,
|
||||
"dirty": False, "error": None}
|
||||
|
||||
|
||||
@register_vcs_handler("git", "get_keywords")
|
||||
def git_get_keywords(versionfile_abs):
|
||||
# the code embedded in _version.py can just fetch the value of these
|
||||
# keywords. When used from setup.py, we don't want to import _version.py,
|
||||
# so we do it with a regexp instead. This function is not used from
|
||||
# _version.py.
|
||||
keywords = {}
|
||||
try:
|
||||
f = open(versionfile_abs, "r")
|
||||
for line in f.readlines():
|
||||
if line.strip().startswith("git_refnames ="):
|
||||
mo = re.search(r'=\s*"(.*)"', line)
|
||||
if mo:
|
||||
keywords["refnames"] = mo.group(1)
|
||||
if line.strip().startswith("git_full ="):
|
||||
mo = re.search(r'=\s*"(.*)"', line)
|
||||
if mo:
|
||||
keywords["full"] = mo.group(1)
|
||||
f.close()
|
||||
except EnvironmentError:
|
||||
pass
|
||||
return keywords
|
||||
|
||||
|
||||
@register_vcs_handler("git", "keywords")
|
||||
def git_versions_from_keywords(keywords, tag_prefix, verbose):
|
||||
if not keywords:
|
||||
raise NotThisMethod("no keywords at all, weird")
|
||||
refnames = keywords["refnames"].strip()
|
||||
if refnames.startswith("$Format"):
|
||||
if verbose:
|
||||
print("keywords are unexpanded, not using")
|
||||
raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
|
||||
refs = set([r.strip() for r in refnames.strip("()").split(",")])
|
||||
# starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
|
||||
# just "foo-1.0". If we see a "tag: " prefix, prefer those.
|
||||
TAG = "tag: "
|
||||
tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)])
|
||||
if not tags:
|
||||
# Either we're using git < 1.8.3, or there really are no tags. We use
|
||||
# a heuristic: assume all version tags have a digit. The old git %d
|
||||
# expansion behaves like git log --decorate=short and strips out the
|
||||
# refs/heads/ and refs/tags/ prefixes that would let us distinguish
|
||||
# between branches and tags. By ignoring refnames without digits, we
|
||||
# filter out many common branch names like "release" and
|
||||
# "stabilization", as well as "HEAD" and "master".
|
||||
tags = set([r for r in refs if re.search(r'\d', r)])
|
||||
if verbose:
|
||||
print("discarding '%s', no digits" % ",".join(refs-tags))
|
||||
if verbose:
|
||||
print("likely tags: %s" % ",".join(sorted(tags)))
|
||||
for ref in sorted(tags):
|
||||
# sorting will prefer e.g. "2.0" over "2.0rc1"
|
||||
if ref.startswith(tag_prefix):
|
||||
r = ref[len(tag_prefix):]
|
||||
if verbose:
|
||||
print("picking %s" % r)
|
||||
return {"version": r,
|
||||
"full-revisionid": keywords["full"].strip(),
|
||||
"dirty": False, "error": None
|
||||
}
|
||||
# no suitable tags, so version is "0+unknown", but full hex is still there
|
||||
if verbose:
|
||||
print("no suitable tags, using unknown + full revision id")
|
||||
return {"version": "0+unknown",
|
||||
"full-revisionid": keywords["full"].strip(),
|
||||
"dirty": False, "error": "no suitable tags"}
|
||||
|
||||
|
||||
@register_vcs_handler("git", "pieces_from_vcs")
|
||||
def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
|
||||
# this runs 'git' from the root of the source tree. This only gets called
|
||||
# if the git-archive 'subst' keywords were *not* expanded, and
|
||||
# _version.py hasn't already been rewritten with a short version string,
|
||||
# meaning we're inside a checked out source tree.
|
||||
|
||||
if not os.path.exists(os.path.join(root, ".git")):
|
||||
if verbose:
|
||||
print("no .git in %s" % root)
|
||||
raise NotThisMethod("no .git directory")
|
||||
|
||||
GITS = ["git"]
|
||||
if sys.platform == "win32":
|
||||
GITS = ["git.cmd", "git.exe"]
|
||||
# if there is a tag, this yields TAG-NUM-gHEX[-dirty]
|
||||
# if there are no tags, this yields HEX[-dirty] (no NUM)
|
||||
describe_out = run_command(GITS, ["describe", "--tags", "--dirty",
|
||||
"--always", "--long"],
|
||||
cwd=root)
|
||||
# --long was added in git-1.5.5
|
||||
if describe_out is None:
|
||||
raise NotThisMethod("'git describe' failed")
|
||||
describe_out = describe_out.strip()
|
||||
full_out = run_command(GITS, ["rev-parse", "HEAD"], cwd=root)
|
||||
if full_out is None:
|
||||
raise NotThisMethod("'git rev-parse' failed")
|
||||
full_out = full_out.strip()
|
||||
|
||||
pieces = {}
|
||||
pieces["long"] = full_out
|
||||
pieces["short"] = full_out[:7] # maybe improved later
|
||||
pieces["error"] = None
|
||||
|
||||
# parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
|
||||
# TAG might have hyphens.
|
||||
git_describe = describe_out
|
||||
|
||||
# look for -dirty suffix
|
||||
dirty = git_describe.endswith("-dirty")
|
||||
pieces["dirty"] = dirty
|
||||
if dirty:
|
||||
git_describe = git_describe[:git_describe.rindex("-dirty")]
|
||||
|
||||
# now we have TAG-NUM-gHEX or HEX
|
||||
|
||||
if "-" in git_describe:
|
||||
# TAG-NUM-gHEX
|
||||
mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
|
||||
if not mo:
|
||||
# unparseable. Maybe git-describe is misbehaving?
|
||||
pieces["error"] = ("unable to parse git-describe output: '%s'"
|
||||
% describe_out)
|
||||
return pieces
|
||||
|
||||
# tag
|
||||
full_tag = mo.group(1)
|
||||
if not full_tag.startswith(tag_prefix):
|
||||
if verbose:
|
||||
fmt = "tag '%s' doesn't start with prefix '%s'"
|
||||
print(fmt % (full_tag, tag_prefix))
|
||||
pieces["error"] = ("tag '%s' doesn't start with prefix '%s'"
|
||||
% (full_tag, tag_prefix))
|
||||
return pieces
|
||||
pieces["closest-tag"] = full_tag[len(tag_prefix):]
|
||||
|
||||
# distance: number of commits since tag
|
||||
pieces["distance"] = int(mo.group(2))
|
||||
|
||||
# commit: short hex revision ID
|
||||
pieces["short"] = mo.group(3)
|
||||
|
||||
else:
|
||||
# HEX: no tags
|
||||
pieces["closest-tag"] = None
|
||||
count_out = run_command(GITS, ["rev-list", "HEAD", "--count"],
|
||||
cwd=root)
|
||||
pieces["distance"] = int(count_out) # total number of commits
|
||||
|
||||
return pieces
|
||||
|
||||
|
||||
def plus_or_dot(pieces):
|
||||
if "+" in pieces.get("closest-tag", ""):
|
||||
return "."
|
||||
return "+"
|
||||
|
||||
|
||||
def render_pep440(pieces):
|
||||
# now build up version string, with post-release "local version
|
||||
# identifier". Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
|
||||
# get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
|
||||
|
||||
# exceptions:
|
||||
# 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
|
||||
|
||||
if pieces["closest-tag"]:
|
||||
rendered = pieces["closest-tag"]
|
||||
if pieces["distance"] or pieces["dirty"]:
|
||||
rendered += plus_or_dot(pieces)
|
||||
rendered += "%d.g%s" % (pieces["distance"], pieces["short"])
|
||||
if pieces["dirty"]:
|
||||
rendered += ".dirty"
|
||||
else:
|
||||
# exception #1
|
||||
rendered = "0+untagged.%d.g%s" % (pieces["distance"],
|
||||
pieces["short"])
|
||||
if pieces["dirty"]:
|
||||
rendered += ".dirty"
|
||||
return rendered
|
||||
|
||||
|
||||
def render_pep440_pre(pieces):
|
||||
# TAG[.post.devDISTANCE] . No -dirty
|
||||
|
||||
# exceptions:
|
||||
# 1: no tags. 0.post.devDISTANCE
|
||||
|
||||
if pieces["closest-tag"]:
|
||||
rendered = pieces["closest-tag"]
|
||||
if pieces["distance"]:
|
||||
rendered += ".post.dev%d" % pieces["distance"]
|
||||
else:
|
||||
# exception #1
|
||||
rendered = "0.post.dev%d" % pieces["distance"]
|
||||
return rendered
|
||||
|
||||
|
||||
def render_pep440_post(pieces):
|
||||
# TAG[.postDISTANCE[.dev0]+gHEX] . The ".dev0" means dirty. Note that
|
||||
# .dev0 sorts backwards (a dirty tree will appear "older" than the
|
||||
# corresponding clean one), but you shouldn't be releasing software with
|
||||
# -dirty anyways.
|
||||
|
||||
# exceptions:
|
||||
# 1: no tags. 0.postDISTANCE[.dev0]
|
||||
|
||||
if pieces["closest-tag"]:
|
||||
rendered = pieces["closest-tag"]
|
||||
if pieces["distance"] or pieces["dirty"]:
|
||||
rendered += ".post%d" % pieces["distance"]
|
||||
if pieces["dirty"]:
|
||||
rendered += ".dev0"
|
||||
rendered += plus_or_dot(pieces)
|
||||
rendered += "g%s" % pieces["short"]
|
||||
else:
|
||||
# exception #1
|
||||
rendered = "0.post%d" % pieces["distance"]
|
||||
if pieces["dirty"]:
|
||||
rendered += ".dev0"
|
||||
rendered += "+g%s" % pieces["short"]
|
||||
return rendered
|
||||
|
||||
|
||||
def render_pep440_old(pieces):
|
||||
# TAG[.postDISTANCE[.dev0]] . The ".dev0" means dirty.
|
||||
|
||||
# exceptions:
|
||||
# 1: no tags. 0.postDISTANCE[.dev0]
|
||||
|
||||
if pieces["closest-tag"]:
|
||||
rendered = pieces["closest-tag"]
|
||||
if pieces["distance"] or pieces["dirty"]:
|
||||
rendered += ".post%d" % pieces["distance"]
|
||||
if pieces["dirty"]:
|
||||
rendered += ".dev0"
|
||||
else:
|
||||
# exception #1
|
||||
rendered = "0.post%d" % pieces["distance"]
|
||||
if pieces["dirty"]:
|
||||
rendered += ".dev0"
|
||||
return rendered
|
||||
|
||||
|
||||
def render_git_describe(pieces):
|
||||
# TAG[-DISTANCE-gHEX][-dirty], like 'git describe --tags --dirty
|
||||
# --always'
|
||||
|
||||
# exceptions:
|
||||
# 1: no tags. HEX[-dirty] (note: no 'g' prefix)
|
||||
|
||||
if pieces["closest-tag"]:
|
||||
rendered = pieces["closest-tag"]
|
||||
if pieces["distance"]:
|
||||
rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
|
||||
else:
|
||||
# exception #1
|
||||
rendered = pieces["short"]
|
||||
if pieces["dirty"]:
|
||||
rendered += "-dirty"
|
||||
return rendered
|
||||
|
||||
|
||||
def render_git_describe_long(pieces):
|
||||
# TAG-DISTANCE-gHEX[-dirty], like 'git describe --tags --dirty
|
||||
# --always -long'. The distance/hash is unconditional.
|
||||
|
||||
# exceptions:
|
||||
# 1: no tags. HEX[-dirty] (note: no 'g' prefix)
|
||||
|
||||
if pieces["closest-tag"]:
|
||||
rendered = pieces["closest-tag"]
|
||||
rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
|
||||
else:
|
||||
# exception #1
|
||||
rendered = pieces["short"]
|
||||
if pieces["dirty"]:
|
||||
rendered += "-dirty"
|
||||
return rendered
|
||||
|
||||
|
||||
def render(pieces, style):
|
||||
if pieces["error"]:
|
||||
return {"version": "unknown",
|
||||
"full-revisionid": pieces.get("long"),
|
||||
"dirty": None,
|
||||
"error": pieces["error"]}
|
||||
|
||||
if not style or style == "default":
|
||||
style = "pep440" # the default
|
||||
|
||||
if style == "pep440":
|
||||
rendered = render_pep440(pieces)
|
||||
elif style == "pep440-pre":
|
||||
rendered = render_pep440_pre(pieces)
|
||||
elif style == "pep440-post":
|
||||
rendered = render_pep440_post(pieces)
|
||||
elif style == "pep440-old":
|
||||
rendered = render_pep440_old(pieces)
|
||||
elif style == "git-describe":
|
||||
rendered = render_git_describe(pieces)
|
||||
elif style == "git-describe-long":
|
||||
rendered = render_git_describe_long(pieces)
|
||||
else:
|
||||
raise ValueError("unknown style '%s'" % style)
|
||||
|
||||
return {"version": rendered, "full-revisionid": pieces["long"],
|
||||
"dirty": pieces["dirty"], "error": None}
|
||||
|
||||
|
||||
def get_versions():
|
||||
# I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
|
||||
# __file__, we can work backwards from there to the root. Some
|
||||
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
|
||||
# case we can only use expanded keywords.
|
||||
|
||||
cfg = get_config()
|
||||
verbose = cfg.verbose
|
||||
|
||||
try:
|
||||
return git_versions_from_keywords(get_keywords(), cfg.tag_prefix,
|
||||
verbose)
|
||||
except NotThisMethod:
|
||||
pass
|
||||
|
||||
try:
|
||||
root = os.path.realpath(__file__)
|
||||
# versionfile_source is the relative path from the top of the source
|
||||
# tree (where the .git directory might live) to this file. Invert
|
||||
# this to find the root from __file__.
|
||||
for i in cfg.versionfile_source.split('/'):
|
||||
root = os.path.dirname(root)
|
||||
except NameError:
|
||||
return {"version": "0+unknown", "full-revisionid": None,
|
||||
"dirty": None,
|
||||
"error": "unable to find root of source tree"}
|
||||
|
||||
try:
|
||||
pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
|
||||
return render(pieces, cfg.style)
|
||||
except NotThisMethod:
|
||||
pass
|
||||
|
||||
try:
|
||||
if cfg.parentdir_prefix:
|
||||
return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
|
||||
except NotThisMethod:
|
||||
pass
|
||||
|
||||
return {"version": "0+unknown", "full-revisionid": None,
|
||||
"dirty": None,
|
||||
"error": "unable to compute version"}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,868 +0,0 @@
|
||||
"""Utilities for writing code that runs on Python 2 and 3"""
|
||||
|
||||
# Copyright (c) 2010-2015 Benjamin Peterson
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import functools
|
||||
import itertools
|
||||
import operator
|
||||
import sys
|
||||
import types
|
||||
|
||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||
__version__ = "1.10.0"
|
||||
|
||||
|
||||
# Useful for very coarse version differentiation.
|
||||
PY2 = sys.version_info[0] == 2
|
||||
PY3 = sys.version_info[0] == 3
|
||||
PY34 = sys.version_info[0:2] >= (3, 4)
|
||||
|
||||
if PY3:
|
||||
string_types = str,
|
||||
integer_types = int,
|
||||
class_types = type,
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
|
||||
MAXSIZE = sys.maxsize
|
||||
else:
|
||||
string_types = basestring,
|
||||
integer_types = (int, long)
|
||||
class_types = (type, types.ClassType)
|
||||
text_type = unicode
|
||||
binary_type = str
|
||||
|
||||
if sys.platform.startswith("java"):
|
||||
# Jython always uses 32 bits.
|
||||
MAXSIZE = int((1 << 31) - 1)
|
||||
else:
|
||||
# It's possible to have sizeof(long) != sizeof(Py_ssize_t).
|
||||
class X(object):
|
||||
|
||||
def __len__(self):
|
||||
return 1 << 31
|
||||
try:
|
||||
len(X())
|
||||
except OverflowError:
|
||||
# 32-bit
|
||||
MAXSIZE = int((1 << 31) - 1)
|
||||
else:
|
||||
# 64-bit
|
||||
MAXSIZE = int((1 << 63) - 1)
|
||||
del X
|
||||
|
||||
|
||||
def _add_doc(func, doc):
|
||||
"""Add documentation to a function."""
|
||||
func.__doc__ = doc
|
||||
|
||||
|
||||
def _import_module(name):
|
||||
"""Import module, returning the module after the last dot."""
|
||||
__import__(name)
|
||||
return sys.modules[name]
|
||||
|
||||
|
||||
class _LazyDescr(object):
|
||||
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
def __get__(self, obj, tp):
|
||||
result = self._resolve()
|
||||
setattr(obj, self.name, result) # Invokes __set__.
|
||||
try:
|
||||
# This is a bit ugly, but it avoids running this again by
|
||||
# removing this descriptor.
|
||||
delattr(obj.__class__, self.name)
|
||||
except AttributeError:
|
||||
pass
|
||||
return result
|
||||
|
||||
|
||||
class MovedModule(_LazyDescr):
|
||||
|
||||
def __init__(self, name, old, new=None):
|
||||
super(MovedModule, self).__init__(name)
|
||||
if PY3:
|
||||
if new is None:
|
||||
new = name
|
||||
self.mod = new
|
||||
else:
|
||||
self.mod = old
|
||||
|
||||
def _resolve(self):
|
||||
return _import_module(self.mod)
|
||||
|
||||
def __getattr__(self, attr):
|
||||
_module = self._resolve()
|
||||
value = getattr(_module, attr)
|
||||
setattr(self, attr, value)
|
||||
return value
|
||||
|
||||
|
||||
class _LazyModule(types.ModuleType):
|
||||
|
||||
def __init__(self, name):
|
||||
super(_LazyModule, self).__init__(name)
|
||||
self.__doc__ = self.__class__.__doc__
|
||||
|
||||
def __dir__(self):
|
||||
attrs = ["__doc__", "__name__"]
|
||||
attrs += [attr.name for attr in self._moved_attributes]
|
||||
return attrs
|
||||
|
||||
# Subclasses should override this
|
||||
_moved_attributes = []
|
||||
|
||||
|
||||
class MovedAttribute(_LazyDescr):
|
||||
|
||||
def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
|
||||
super(MovedAttribute, self).__init__(name)
|
||||
if PY3:
|
||||
if new_mod is None:
|
||||
new_mod = name
|
||||
self.mod = new_mod
|
||||
if new_attr is None:
|
||||
if old_attr is None:
|
||||
new_attr = name
|
||||
else:
|
||||
new_attr = old_attr
|
||||
self.attr = new_attr
|
||||
else:
|
||||
self.mod = old_mod
|
||||
if old_attr is None:
|
||||
old_attr = name
|
||||
self.attr = old_attr
|
||||
|
||||
def _resolve(self):
|
||||
module = _import_module(self.mod)
|
||||
return getattr(module, self.attr)
|
||||
|
||||
|
||||
class _SixMetaPathImporter(object):
|
||||
|
||||
"""
|
||||
A meta path importer to import six.moves and its submodules.
|
||||
|
||||
This class implements a PEP302 finder and loader. It should be compatible
|
||||
with Python 2.5 and all existing versions of Python3
|
||||
"""
|
||||
|
||||
def __init__(self, six_module_name):
|
||||
self.name = six_module_name
|
||||
self.known_modules = {}
|
||||
|
||||
def _add_module(self, mod, *fullnames):
|
||||
for fullname in fullnames:
|
||||
self.known_modules[self.name + "." + fullname] = mod
|
||||
|
||||
def _get_module(self, fullname):
|
||||
return self.known_modules[self.name + "." + fullname]
|
||||
|
||||
def find_module(self, fullname, path=None):
|
||||
if fullname in self.known_modules:
|
||||
return self
|
||||
return None
|
||||
|
||||
def __get_module(self, fullname):
|
||||
try:
|
||||
return self.known_modules[fullname]
|
||||
except KeyError:
|
||||
raise ImportError("This loader does not know module " + fullname)
|
||||
|
||||
def load_module(self, fullname):
|
||||
try:
|
||||
# in case of a reload
|
||||
return sys.modules[fullname]
|
||||
except KeyError:
|
||||
pass
|
||||
mod = self.__get_module(fullname)
|
||||
if isinstance(mod, MovedModule):
|
||||
mod = mod._resolve()
|
||||
else:
|
||||
mod.__loader__ = self
|
||||
sys.modules[fullname] = mod
|
||||
return mod
|
||||
|
||||
def is_package(self, fullname):
|
||||
"""
|
||||
Return true, if the named module is a package.
|
||||
|
||||
We need this method to get correct spec objects with
|
||||
Python 3.4 (see PEP451)
|
||||
"""
|
||||
return hasattr(self.__get_module(fullname), "__path__")
|
||||
|
||||
def get_code(self, fullname):
|
||||
"""Return None
|
||||
|
||||
Required, if is_package is implemented"""
|
||||
self.__get_module(fullname) # eventually raises ImportError
|
||||
return None
|
||||
get_source = get_code # same as get_code
|
||||
|
||||
_importer = _SixMetaPathImporter(__name__)
|
||||
|
||||
|
||||
class _MovedItems(_LazyModule):
|
||||
|
||||
"""Lazy loading of moved objects"""
|
||||
__path__ = [] # mark as package
|
||||
|
||||
|
||||
_moved_attributes = [
|
||||
MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
|
||||
MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
|
||||
MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
|
||||
MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
|
||||
MovedAttribute("intern", "__builtin__", "sys"),
|
||||
MovedAttribute("map", "itertools", "builtins", "imap", "map"),
|
||||
MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
|
||||
MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
|
||||
MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
|
||||
MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"),
|
||||
MovedAttribute("reduce", "__builtin__", "functools"),
|
||||
MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
|
||||
MovedAttribute("StringIO", "StringIO", "io"),
|
||||
MovedAttribute("UserDict", "UserDict", "collections"),
|
||||
MovedAttribute("UserList", "UserList", "collections"),
|
||||
MovedAttribute("UserString", "UserString", "collections"),
|
||||
MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
|
||||
MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
|
||||
MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),
|
||||
MovedModule("builtins", "__builtin__"),
|
||||
MovedModule("configparser", "ConfigParser"),
|
||||
MovedModule("copyreg", "copy_reg"),
|
||||
MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
|
||||
MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"),
|
||||
MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
|
||||
MovedModule("http_cookies", "Cookie", "http.cookies"),
|
||||
MovedModule("html_entities", "htmlentitydefs", "html.entities"),
|
||||
MovedModule("html_parser", "HTMLParser", "html.parser"),
|
||||
MovedModule("http_client", "httplib", "http.client"),
|
||||
MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
|
||||
MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
|
||||
MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
|
||||
MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
|
||||
MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
|
||||
MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
|
||||
MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
|
||||
MovedModule("cPickle", "cPickle", "pickle"),
|
||||
MovedModule("queue", "Queue"),
|
||||
MovedModule("reprlib", "repr"),
|
||||
MovedModule("socketserver", "SocketServer"),
|
||||
MovedModule("_thread", "thread", "_thread"),
|
||||
MovedModule("tkinter", "Tkinter"),
|
||||
MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
|
||||
MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
|
||||
MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
|
||||
MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
|
||||
MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
|
||||
MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
|
||||
MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
|
||||
MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
|
||||
MovedModule("tkinter_colorchooser", "tkColorChooser",
|
||||
"tkinter.colorchooser"),
|
||||
MovedModule("tkinter_commondialog", "tkCommonDialog",
|
||||
"tkinter.commondialog"),
|
||||
MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
|
||||
MovedModule("tkinter_font", "tkFont", "tkinter.font"),
|
||||
MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
|
||||
MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
|
||||
"tkinter.simpledialog"),
|
||||
MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
|
||||
MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
|
||||
MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
|
||||
MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
|
||||
MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
|
||||
MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
|
||||
]
|
||||
# Add windows specific modules.
|
||||
if sys.platform == "win32":
|
||||
_moved_attributes += [
|
||||
MovedModule("winreg", "_winreg"),
|
||||
]
|
||||
|
||||
for attr in _moved_attributes:
|
||||
setattr(_MovedItems, attr.name, attr)
|
||||
if isinstance(attr, MovedModule):
|
||||
_importer._add_module(attr, "moves." + attr.name)
|
||||
del attr
|
||||
|
||||
_MovedItems._moved_attributes = _moved_attributes
|
||||
|
||||
moves = _MovedItems(__name__ + ".moves")
|
||||
_importer._add_module(moves, "moves")
|
||||
|
||||
|
||||
class Module_six_moves_urllib_parse(_LazyModule):
|
||||
|
||||
"""Lazy loading of moved objects in six.moves.urllib_parse"""
|
||||
|
||||
|
||||
_urllib_parse_moved_attributes = [
|
||||
MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("urljoin", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("urlparse", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("quote", "urllib", "urllib.parse"),
|
||||
MovedAttribute("quote_plus", "urllib", "urllib.parse"),
|
||||
MovedAttribute("unquote", "urllib", "urllib.parse"),
|
||||
MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
|
||||
MovedAttribute("urlencode", "urllib", "urllib.parse"),
|
||||
MovedAttribute("splitquery", "urllib", "urllib.parse"),
|
||||
MovedAttribute("splittag", "urllib", "urllib.parse"),
|
||||
MovedAttribute("splituser", "urllib", "urllib.parse"),
|
||||
MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("uses_params", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("uses_query", "urlparse", "urllib.parse"),
|
||||
MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
|
||||
]
|
||||
for attr in _urllib_parse_moved_attributes:
|
||||
setattr(Module_six_moves_urllib_parse, attr.name, attr)
|
||||
del attr
|
||||
|
||||
Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes
|
||||
|
||||
_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
|
||||
"moves.urllib_parse", "moves.urllib.parse")
|
||||
|
||||
|
||||
class Module_six_moves_urllib_error(_LazyModule):
|
||||
|
||||
"""Lazy loading of moved objects in six.moves.urllib_error"""
|
||||
|
||||
|
||||
_urllib_error_moved_attributes = [
|
||||
MovedAttribute("URLError", "urllib2", "urllib.error"),
|
||||
MovedAttribute("HTTPError", "urllib2", "urllib.error"),
|
||||
MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
|
||||
]
|
||||
for attr in _urllib_error_moved_attributes:
|
||||
setattr(Module_six_moves_urllib_error, attr.name, attr)
|
||||
del attr
|
||||
|
||||
Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes
|
||||
|
||||
_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
|
||||
"moves.urllib_error", "moves.urllib.error")
|
||||
|
||||
|
||||
class Module_six_moves_urllib_request(_LazyModule):
|
||||
|
||||
"""Lazy loading of moved objects in six.moves.urllib_request"""
|
||||
|
||||
|
||||
_urllib_request_moved_attributes = [
|
||||
MovedAttribute("urlopen", "urllib2", "urllib.request"),
|
||||
MovedAttribute("install_opener", "urllib2", "urllib.request"),
|
||||
MovedAttribute("build_opener", "urllib2", "urllib.request"),
|
||||
MovedAttribute("pathname2url", "urllib", "urllib.request"),
|
||||
MovedAttribute("url2pathname", "urllib", "urllib.request"),
|
||||
MovedAttribute("getproxies", "urllib", "urllib.request"),
|
||||
MovedAttribute("Request", "urllib2", "urllib.request"),
|
||||
MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
|
||||
MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
|
||||
MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("FileHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
|
||||
MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
|
||||
MovedAttribute("urlretrieve", "urllib", "urllib.request"),
|
||||
MovedAttribute("urlcleanup", "urllib", "urllib.request"),
|
||||
MovedAttribute("URLopener", "urllib", "urllib.request"),
|
||||
MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
|
||||
MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
|
||||
]
|
||||
for attr in _urllib_request_moved_attributes:
|
||||
setattr(Module_six_moves_urllib_request, attr.name, attr)
|
||||
del attr
|
||||
|
||||
Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes
|
||||
|
||||
_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
|
||||
"moves.urllib_request", "moves.urllib.request")
|
||||
|
||||
|
||||
class Module_six_moves_urllib_response(_LazyModule):
|
||||
|
||||
"""Lazy loading of moved objects in six.moves.urllib_response"""
|
||||
|
||||
|
||||
_urllib_response_moved_attributes = [
|
||||
MovedAttribute("addbase", "urllib", "urllib.response"),
|
||||
MovedAttribute("addclosehook", "urllib", "urllib.response"),
|
||||
MovedAttribute("addinfo", "urllib", "urllib.response"),
|
||||
MovedAttribute("addinfourl", "urllib", "urllib.response"),
|
||||
]
|
||||
for attr in _urllib_response_moved_attributes:
|
||||
setattr(Module_six_moves_urllib_response, attr.name, attr)
|
||||
del attr
|
||||
|
||||
Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes
|
||||
|
||||
_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
|
||||
"moves.urllib_response", "moves.urllib.response")
|
||||
|
||||
|
||||
class Module_six_moves_urllib_robotparser(_LazyModule):
|
||||
|
||||
"""Lazy loading of moved objects in six.moves.urllib_robotparser"""
|
||||
|
||||
|
||||
_urllib_robotparser_moved_attributes = [
|
||||
MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
|
||||
]
|
||||
for attr in _urllib_robotparser_moved_attributes:
|
||||
setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
|
||||
del attr
|
||||
|
||||
Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes
|
||||
|
||||
_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
|
||||
"moves.urllib_robotparser", "moves.urllib.robotparser")
|
||||
|
||||
|
||||
class Module_six_moves_urllib(types.ModuleType):
|
||||
|
||||
"""Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
|
||||
__path__ = [] # mark as package
|
||||
parse = _importer._get_module("moves.urllib_parse")
|
||||
error = _importer._get_module("moves.urllib_error")
|
||||
request = _importer._get_module("moves.urllib_request")
|
||||
response = _importer._get_module("moves.urllib_response")
|
||||
robotparser = _importer._get_module("moves.urllib_robotparser")
|
||||
|
||||
def __dir__(self):
|
||||
return ['parse', 'error', 'request', 'response', 'robotparser']
|
||||
|
||||
_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"),
|
||||
"moves.urllib")
|
||||
|
||||
|
||||
def add_move(move):
|
||||
"""Add an item to six.moves."""
|
||||
setattr(_MovedItems, move.name, move)
|
||||
|
||||
|
||||
def remove_move(name):
|
||||
"""Remove item from six.moves."""
|
||||
try:
|
||||
delattr(_MovedItems, name)
|
||||
except AttributeError:
|
||||
try:
|
||||
del moves.__dict__[name]
|
||||
except KeyError:
|
||||
raise AttributeError("no such move, %r" % (name,))
|
||||
|
||||
|
||||
if PY3:
|
||||
_meth_func = "__func__"
|
||||
_meth_self = "__self__"
|
||||
|
||||
_func_closure = "__closure__"
|
||||
_func_code = "__code__"
|
||||
_func_defaults = "__defaults__"
|
||||
_func_globals = "__globals__"
|
||||
else:
|
||||
_meth_func = "im_func"
|
||||
_meth_self = "im_self"
|
||||
|
||||
_func_closure = "func_closure"
|
||||
_func_code = "func_code"
|
||||
_func_defaults = "func_defaults"
|
||||
_func_globals = "func_globals"
|
||||
|
||||
|
||||
try:
|
||||
advance_iterator = next
|
||||
except NameError:
|
||||
def advance_iterator(it):
|
||||
return it.next()
|
||||
next = advance_iterator
|
||||
|
||||
|
||||
try:
|
||||
callable = callable
|
||||
except NameError:
|
||||
def callable(obj):
|
||||
return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
|
||||
|
||||
|
||||
if PY3:
|
||||
def get_unbound_function(unbound):
|
||||
return unbound
|
||||
|
||||
create_bound_method = types.MethodType
|
||||
|
||||
def create_unbound_method(func, cls):
|
||||
return func
|
||||
|
||||
Iterator = object
|
||||
else:
|
||||
def get_unbound_function(unbound):
|
||||
return unbound.im_func
|
||||
|
||||
def create_bound_method(func, obj):
|
||||
return types.MethodType(func, obj, obj.__class__)
|
||||
|
||||
def create_unbound_method(func, cls):
|
||||
return types.MethodType(func, None, cls)
|
||||
|
||||
class Iterator(object):
|
||||
|
||||
def next(self):
|
||||
return type(self).__next__(self)
|
||||
|
||||
callable = callable
|
||||
_add_doc(get_unbound_function,
|
||||
"""Get the function out of a possibly unbound function""")
|
||||
|
||||
|
||||
get_method_function = operator.attrgetter(_meth_func)
|
||||
get_method_self = operator.attrgetter(_meth_self)
|
||||
get_function_closure = operator.attrgetter(_func_closure)
|
||||
get_function_code = operator.attrgetter(_func_code)
|
||||
get_function_defaults = operator.attrgetter(_func_defaults)
|
||||
get_function_globals = operator.attrgetter(_func_globals)
|
||||
|
||||
|
||||
if PY3:
|
||||
def iterkeys(d, **kw):
|
||||
return iter(d.keys(**kw))
|
||||
|
||||
def itervalues(d, **kw):
|
||||
return iter(d.values(**kw))
|
||||
|
||||
def iteritems(d, **kw):
|
||||
return iter(d.items(**kw))
|
||||
|
||||
def iterlists(d, **kw):
|
||||
return iter(d.lists(**kw))
|
||||
|
||||
viewkeys = operator.methodcaller("keys")
|
||||
|
||||
viewvalues = operator.methodcaller("values")
|
||||
|
||||
viewitems = operator.methodcaller("items")
|
||||
else:
|
||||
def iterkeys(d, **kw):
|
||||
return d.iterkeys(**kw)
|
||||
|
||||
def itervalues(d, **kw):
|
||||
return d.itervalues(**kw)
|
||||
|
||||
def iteritems(d, **kw):
|
||||
return d.iteritems(**kw)
|
||||
|
||||
def iterlists(d, **kw):
|
||||
return d.iterlists(**kw)
|
||||
|
||||
viewkeys = operator.methodcaller("viewkeys")
|
||||
|
||||
viewvalues = operator.methodcaller("viewvalues")
|
||||
|
||||
viewitems = operator.methodcaller("viewitems")
|
||||
|
||||
_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
|
||||
_add_doc(itervalues, "Return an iterator over the values of a dictionary.")
|
||||
_add_doc(iteritems,
|
||||
"Return an iterator over the (key, value) pairs of a dictionary.")
|
||||
_add_doc(iterlists,
|
||||
"Return an iterator over the (key, [values]) pairs of a dictionary.")
|
||||
|
||||
|
||||
if PY3:
|
||||
def b(s):
|
||||
return s.encode("latin-1")
|
||||
|
||||
def u(s):
|
||||
return s
|
||||
unichr = chr
|
||||
import struct
|
||||
int2byte = struct.Struct(">B").pack
|
||||
del struct
|
||||
byte2int = operator.itemgetter(0)
|
||||
indexbytes = operator.getitem
|
||||
iterbytes = iter
|
||||
import io
|
||||
StringIO = io.StringIO
|
||||
BytesIO = io.BytesIO
|
||||
_assertCountEqual = "assertCountEqual"
|
||||
if sys.version_info[1] <= 1:
|
||||
_assertRaisesRegex = "assertRaisesRegexp"
|
||||
_assertRegex = "assertRegexpMatches"
|
||||
else:
|
||||
_assertRaisesRegex = "assertRaisesRegex"
|
||||
_assertRegex = "assertRegex"
|
||||
else:
|
||||
def b(s):
|
||||
return s
|
||||
# Workaround for standalone backslash
|
||||
|
||||
def u(s):
|
||||
return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
|
||||
unichr = unichr
|
||||
int2byte = chr
|
||||
|
||||
def byte2int(bs):
|
||||
return ord(bs[0])
|
||||
|
||||
def indexbytes(buf, i):
|
||||
return ord(buf[i])
|
||||
iterbytes = functools.partial(itertools.imap, ord)
|
||||
import StringIO
|
||||
StringIO = BytesIO = StringIO.StringIO
|
||||
_assertCountEqual = "assertItemsEqual"
|
||||
_assertRaisesRegex = "assertRaisesRegexp"
|
||||
_assertRegex = "assertRegexpMatches"
|
||||
_add_doc(b, """Byte literal""")
|
||||
_add_doc(u, """Text literal""")
|
||||
|
||||
|
||||
def assertCountEqual(self, *args, **kwargs):
|
||||
return getattr(self, _assertCountEqual)(*args, **kwargs)
|
||||
|
||||
|
||||
def assertRaisesRegex(self, *args, **kwargs):
|
||||
return getattr(self, _assertRaisesRegex)(*args, **kwargs)
|
||||
|
||||
|
||||
def assertRegex(self, *args, **kwargs):
|
||||
return getattr(self, _assertRegex)(*args, **kwargs)
|
||||
|
||||
|
||||
if PY3:
|
||||
exec_ = getattr(moves.builtins, "exec")
|
||||
|
||||
def reraise(tp, value, tb=None):
|
||||
if value is None:
|
||||
value = tp()
|
||||
if value.__traceback__ is not tb:
|
||||
raise value.with_traceback(tb)
|
||||
raise value
|
||||
|
||||
else:
|
||||
def exec_(_code_, _globs_=None, _locs_=None):
|
||||
"""Execute code in a namespace."""
|
||||
if _globs_ is None:
|
||||
frame = sys._getframe(1)
|
||||
_globs_ = frame.f_globals
|
||||
if _locs_ is None:
|
||||
_locs_ = frame.f_locals
|
||||
del frame
|
||||
elif _locs_ is None:
|
||||
_locs_ = _globs_
|
||||
exec("""exec _code_ in _globs_, _locs_""")
|
||||
|
||||
exec_("""def reraise(tp, value, tb=None):
|
||||
raise tp, value, tb
|
||||
""")
|
||||
|
||||
|
||||
if sys.version_info[:2] == (3, 2):
|
||||
exec_("""def raise_from(value, from_value):
|
||||
if from_value is None:
|
||||
raise value
|
||||
raise value from from_value
|
||||
""")
|
||||
elif sys.version_info[:2] > (3, 2):
|
||||
exec_("""def raise_from(value, from_value):
|
||||
raise value from from_value
|
||||
""")
|
||||
else:
|
||||
def raise_from(value, from_value):
|
||||
raise value
|
||||
|
||||
|
||||
print_ = getattr(moves.builtins, "print", None)
|
||||
if print_ is None:
|
||||
def print_(*args, **kwargs):
|
||||
"""The new-style print function for Python 2.4 and 2.5."""
|
||||
fp = kwargs.pop("file", sys.stdout)
|
||||
if fp is None:
|
||||
return
|
||||
|
||||
def write(data):
|
||||
if not isinstance(data, basestring):
|
||||
data = str(data)
|
||||
# If the file has an encoding, encode unicode with it.
|
||||
if (isinstance(fp, file) and
|
||||
isinstance(data, unicode) and
|
||||
fp.encoding is not None):
|
||||
errors = getattr(fp, "errors", None)
|
||||
if errors is None:
|
||||
errors = "strict"
|
||||
data = data.encode(fp.encoding, errors)
|
||||
fp.write(data)
|
||||
want_unicode = False
|
||||
sep = kwargs.pop("sep", None)
|
||||
if sep is not None:
|
||||
if isinstance(sep, unicode):
|
||||
want_unicode = True
|
||||
elif not isinstance(sep, str):
|
||||
raise TypeError("sep must be None or a string")
|
||||
end = kwargs.pop("end", None)
|
||||
if end is not None:
|
||||
if isinstance(end, unicode):
|
||||
want_unicode = True
|
||||
elif not isinstance(end, str):
|
||||
raise TypeError("end must be None or a string")
|
||||
if kwargs:
|
||||
raise TypeError("invalid keyword arguments to print()")
|
||||
if not want_unicode:
|
||||
for arg in args:
|
||||
if isinstance(arg, unicode):
|
||||
want_unicode = True
|
||||
break
|
||||
if want_unicode:
|
||||
newline = unicode("\n")
|
||||
space = unicode(" ")
|
||||
else:
|
||||
newline = "\n"
|
||||
space = " "
|
||||
if sep is None:
|
||||
sep = space
|
||||
if end is None:
|
||||
end = newline
|
||||
for i, arg in enumerate(args):
|
||||
if i:
|
||||
write(sep)
|
||||
write(arg)
|
||||
write(end)
|
||||
if sys.version_info[:2] < (3, 3):
|
||||
_print = print_
|
||||
|
||||
def print_(*args, **kwargs):
|
||||
fp = kwargs.get("file", sys.stdout)
|
||||
flush = kwargs.pop("flush", False)
|
||||
_print(*args, **kwargs)
|
||||
if flush and fp is not None:
|
||||
fp.flush()
|
||||
|
||||
_add_doc(reraise, """Reraise an exception.""")
|
||||
|
||||
if sys.version_info[0:2] < (3, 4):
|
||||
def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
|
||||
updated=functools.WRAPPER_UPDATES):
|
||||
def wrapper(f):
|
||||
f = functools.wraps(wrapped, assigned, updated)(f)
|
||||
f.__wrapped__ = wrapped
|
||||
return f
|
||||
return wrapper
|
||||
else:
|
||||
wraps = functools.wraps
|
||||
|
||||
|
||||
def with_metaclass(meta, *bases):
|
||||
"""Create a base class with a metaclass."""
|
||||
# This requires a bit of explanation: the basic idea is to make a dummy
|
||||
# metaclass for one level of class instantiation that replaces itself with
|
||||
# the actual metaclass.
|
||||
class metaclass(meta):
|
||||
|
||||
def __new__(cls, name, this_bases, d):
|
||||
return meta(name, bases, d)
|
||||
return type.__new__(metaclass, 'temporary_class', (), {})
|
||||
|
||||
|
||||
def add_metaclass(metaclass):
|
||||
"""Class decorator for creating a class with a metaclass."""
|
||||
def wrapper(cls):
|
||||
orig_vars = cls.__dict__.copy()
|
||||
slots = orig_vars.get('__slots__')
|
||||
if slots is not None:
|
||||
if isinstance(slots, str):
|
||||
slots = [slots]
|
||||
for slots_var in slots:
|
||||
orig_vars.pop(slots_var)
|
||||
orig_vars.pop('__dict__', None)
|
||||
orig_vars.pop('__weakref__', None)
|
||||
return metaclass(cls.__name__, cls.__bases__, orig_vars)
|
||||
return wrapper
|
||||
|
||||
|
||||
def python_2_unicode_compatible(klass):
|
||||
"""
|
||||
A decorator that defines __unicode__ and __str__ methods under Python 2.
|
||||
Under Python 3 it does nothing.
|
||||
|
||||
To support Python 2 and 3 with a single code base, define a __str__ method
|
||||
returning text and apply this decorator to the class.
|
||||
"""
|
||||
if PY2:
|
||||
if '__str__' not in klass.__dict__:
|
||||
raise ValueError("@python_2_unicode_compatible cannot be applied "
|
||||
"to %s because it doesn't define __str__()." %
|
||||
klass.__name__)
|
||||
klass.__unicode__ = klass.__str__
|
||||
klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
|
||||
return klass
|
||||
|
||||
|
||||
# Complete the moves implementation.
|
||||
# This code is at the end of this module to speed up module loading.
|
||||
# Turn this module into a package.
|
||||
__path__ = [] # required for PEP 302 and PEP 451
|
||||
__package__ = __name__ # see PEP 366 @ReservedAssignment
|
||||
if globals().get("__spec__") is not None:
|
||||
__spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable
|
||||
# Remove other six meta path importers, since they cause problems. This can
|
||||
# happen if six is removed from sys.modules and then reloaded. (Setuptools does
|
||||
# this for some reason.)
|
||||
if sys.meta_path:
|
||||
for i, importer in enumerate(sys.meta_path):
|
||||
# Here's some real nastiness: Another "instance" of the six module might
|
||||
# be floating around. Therefore, we can't use isinstance() to check for
|
||||
# the six meta path importer, since the other six instance will have
|
||||
# inserted an importer with different class.
|
||||
if (type(importer).__name__ == "_SixMetaPathImporter" and
|
||||
importer.name == __name__):
|
||||
del sys.meta_path[i]
|
||||
break
|
||||
del i, importer
|
||||
# Finally, add the importer to the meta path import hook.
|
||||
sys.meta_path.append(_importer)
|
||||
@@ -137,6 +137,8 @@ def populate_generator(table, default=True, compute=False, contents={}):
|
||||
continue
|
||||
elif field.type == 'upload':
|
||||
continue
|
||||
elif field.compute is not None:
|
||||
continue
|
||||
elif default and not field.default in (None, ''):
|
||||
record[fieldname] = field.default
|
||||
elif compute and field.compute:
|
||||
|
||||
@@ -8,7 +8,7 @@ __author__ = "Mariano Reingart"
|
||||
__author_email__ = "reingart@gmail.com"
|
||||
__copyright__ = "Copyright (C) 2013 Mariano Reingart"
|
||||
__license__ = "LGPL 3.0"
|
||||
__version__ = "1.16"
|
||||
__version__ = "1.16.2"
|
||||
|
||||
TIMEOUT = 60
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ class SoapClient(object):
|
||||
}
|
||||
|
||||
if self.action is not None:
|
||||
headers['SOAPAction'] = soap_action
|
||||
headers['SOAPAction'] = '"' + soap_action + '"'
|
||||
|
||||
headers.update(self.http_headers)
|
||||
log.info("POST %s" % location)
|
||||
|
||||
@@ -119,11 +119,11 @@ class SoapDispatcher(object):
|
||||
xml = xml.replace('/>', ' ' + _ns_str + '/>')
|
||||
return xml
|
||||
|
||||
def register_function(self, name, fn, returns=None, args=None, doc=None):
|
||||
self.methods[name] = fn, returns, args, doc or getattr(fn, "__doc__", "")
|
||||
def register_function(self, name, fn, returns=None, args=None, doc=None, response_element_name=None):
|
||||
self.methods[name] = fn, returns, args, doc or getattr(fn, "__doc__", ""), response_element_name or '%sResponse' % name
|
||||
|
||||
def response_element_name(self, method):
|
||||
return '%sResponse' % method
|
||||
return self.methods[method][4]
|
||||
|
||||
def dispatch(self, xml, action=None, fault=None):
|
||||
"""Receive and process SOAP call, returns the xml"""
|
||||
@@ -179,7 +179,7 @@ class SoapDispatcher(object):
|
||||
prefix = method.get_prefix()
|
||||
|
||||
log.debug('dispatch method: %s', name)
|
||||
function, returns_types, args_types, doc = self.methods[name]
|
||||
function, returns_types, args_types, doc, response_element_name = self.methods[name]
|
||||
log.debug('returns_types %s', returns_types)
|
||||
|
||||
# de-serialize parameters (if type definitions given)
|
||||
@@ -286,11 +286,11 @@ class SoapDispatcher(object):
|
||||
|
||||
def list_methods(self):
|
||||
"""Return a list of aregistered operations"""
|
||||
return [(method, doc) for method, (function, returns, args, doc) in self.methods.items()]
|
||||
return [(method, doc) for method, (function, returns, args, doc, response_element_name) in self.methods.items()]
|
||||
|
||||
def help(self, method=None):
|
||||
"""Generate sample request and response messages"""
|
||||
(function, returns, args, doc) = self.methods[method]
|
||||
(function, returns, args, doc, response_element_name) = self.methods[method]
|
||||
xml = """
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body><%(method)s xmlns="%(namespace)s"/></soap:Body>
|
||||
@@ -307,8 +307,8 @@ class SoapDispatcher(object):
|
||||
|
||||
xml = """
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body><%(method)sResponse xmlns="%(namespace)s"/></soap:Body>
|
||||
</soap:Envelope>""" % {'method': method, 'namespace': self.namespace}
|
||||
<soap:Body><%(response_element_name)s xmlns="%(namespace)s"/></soap:Body>
|
||||
</soap:Envelope>""" % {'response_element_name': response_element_name, 'namespace': self.namespace}
|
||||
response = SimpleXMLElement(xml, namespace=self.namespace, prefix=self.prefix)
|
||||
if returns:
|
||||
items = returns.items()
|
||||
@@ -317,7 +317,7 @@ class SoapDispatcher(object):
|
||||
else:
|
||||
items = []
|
||||
for k, v in items:
|
||||
response('%sResponse' % method).marshall(k, v, add_comments=True, ns=False)
|
||||
response(response_element_name).marshall(k, v, add_comments=True, ns=False)
|
||||
|
||||
return request.as_xml(pretty=True), response.as_xml(pretty=True), doc
|
||||
|
||||
@@ -343,7 +343,7 @@ class SoapDispatcher(object):
|
||||
""" % {'namespace': self.namespace, 'name': self.name, 'documentation': self.documentation}
|
||||
wsdl = SimpleXMLElement(xml)
|
||||
|
||||
for method, (function, returns, args, doc) in self.methods.items():
|
||||
for method, (function, returns, args, doc, response_element_name) in self.methods.items():
|
||||
# create elements:
|
||||
|
||||
def parse_element(name, values, array=False, complex=False):
|
||||
@@ -389,20 +389,20 @@ class SoapDispatcher(object):
|
||||
e.add_attribute('type', t)
|
||||
|
||||
parse_element("%s" % method, args and args.items())
|
||||
parse_element("%sResponse" % method, returns and returns.items())
|
||||
parse_element(response_element_name, returns and returns.items())
|
||||
|
||||
# create messages:
|
||||
for m, e in ('Input', ''), ('Output', 'Response'):
|
||||
for m, e in ('Input', method), ('Output', response_element_name):
|
||||
message = wsdl.add_child('wsdl:message')
|
||||
message['name'] = "%s%s" % (method, m)
|
||||
part = message.add_child("wsdl:part")
|
||||
part[:] = {'name': 'parameters',
|
||||
'element': 'tns:%s%s' % (method, e)}
|
||||
'element': 'tns:%s' % e}
|
||||
|
||||
# create ports
|
||||
portType = wsdl.add_child('wsdl:portType')
|
||||
portType['name'] = "%sPortType" % self.name
|
||||
for method, (function, returns, args, doc) in self.methods.items():
|
||||
for method, (function, returns, args, doc, response_element_name) in self.methods.items():
|
||||
op = portType.add_child('wsdl:operation')
|
||||
op['name'] = method
|
||||
if doc:
|
||||
|
||||
@@ -10,7 +10,7 @@ except:
|
||||
import time
|
||||
import re
|
||||
import logging
|
||||
import thread
|
||||
from threading import Lock
|
||||
import random
|
||||
from gluon import current
|
||||
from gluon.cache import CacheAbstract
|
||||
@@ -19,7 +19,7 @@ from gluon.contrib.redis_utils import register_release_lock, RConnectionError
|
||||
|
||||
logger = logging.getLogger("web2py.cache.redis")
|
||||
|
||||
locker = thread.allocate_lock()
|
||||
locker = Lock()
|
||||
|
||||
|
||||
def RedisCache(redis_conn=None, debug=False, with_lock=False, fail_gracefully=False, db=None):
|
||||
@@ -159,13 +159,15 @@ class RedisClient(object):
|
||||
lock_key = '%s:__lock' % newKey
|
||||
randomvalue = time.time()
|
||||
al = acquire_lock(self.r_server, lock_key, randomvalue)
|
||||
# someone may have computed it
|
||||
obj = self.r_server.get(newKey)
|
||||
if obj is None:
|
||||
value = self.cache_it(newKey, f, time_expire)
|
||||
else:
|
||||
value = pickle.loads(obj)
|
||||
release_lock(self, lock_key, al)
|
||||
try:
|
||||
# someone may have computed it
|
||||
obj = self.r_server.get(newKey)
|
||||
if obj is None:
|
||||
value = self.cache_it(newKey, f, time_expire)
|
||||
else:
|
||||
value = pickle.loads(obj)
|
||||
finally:
|
||||
release_lock(self, lock_key, al)
|
||||
else:
|
||||
# without distributed locking
|
||||
value = self.cache_it(newKey, f, time_expire)
|
||||
|
||||
@@ -8,15 +8,16 @@ Redis-backed sessions
|
||||
"""
|
||||
|
||||
import logging
|
||||
import thread
|
||||
from threading import Lock
|
||||
from gluon import current
|
||||
from gluon.storage import Storage
|
||||
from gluon.contrib.redis_utils import acquire_lock, release_lock
|
||||
from gluon.contrib.redis_utils import register_release_lock
|
||||
from gluon._compat import to_bytes
|
||||
|
||||
logger = logging.getLogger("web2py.session.redis")
|
||||
|
||||
locker = thread.allocate_lock()
|
||||
locker = Lock()
|
||||
|
||||
|
||||
def RedisSession(redis_conn, session_expiry=False, with_lock=False, db=None):
|
||||
@@ -43,7 +44,7 @@ def RedisSession(redis_conn, session_expiry=False, with_lock=False, db=None):
|
||||
try:
|
||||
instance_name = 'redis_instance_' + current.request.application
|
||||
if not hasattr(RedisSession, instance_name):
|
||||
setattr(RedisSession, instance_name,
|
||||
setattr(RedisSession, instance_name,
|
||||
RedisClient(redis_conn, session_expiry=session_expiry, with_lock=with_lock))
|
||||
return getattr(RedisSession, instance_name)
|
||||
finally:
|
||||
@@ -185,8 +186,8 @@ class MockQuery(object):
|
||||
if rtn:
|
||||
if self.unique_key:
|
||||
# make sure the id and unique_key are correct
|
||||
if rtn['unique_key'] == self.unique_key:
|
||||
rtn['update_record'] = self.update # update record support
|
||||
if rtn[b'unique_key'] == to_bytes(self.unique_key):
|
||||
rtn[b'update_record'] = self.update # update record support
|
||||
else:
|
||||
rtn = None
|
||||
return [Storage(rtn)] if rtn else []
|
||||
|
||||
@@ -11,7 +11,7 @@ to ensure compatibility with another - similar - library
|
||||
"""
|
||||
|
||||
import logging
|
||||
import thread
|
||||
from threading import Lock
|
||||
import time
|
||||
from gluon import current
|
||||
|
||||
@@ -26,7 +26,7 @@ except ImportError:
|
||||
raise RuntimeError('Needs redis library to work')
|
||||
|
||||
|
||||
locker = thread.allocate_lock()
|
||||
locker = Lock()
|
||||
|
||||
|
||||
def RConn(*args, **vars):
|
||||
|
||||
@@ -673,3 +673,23 @@ def simple_detect(agent):
|
||||
if os_version:
|
||||
os = " ".join((os, os_version))
|
||||
return os, browser
|
||||
|
||||
|
||||
class mobilize(object):
|
||||
"""
|
||||
Decorator for controller functions so they use different views for mobile devices.
|
||||
|
||||
WARNING: If you update httpagentparser make sure to leave mobilize for
|
||||
backwards compatibility.
|
||||
"""
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
|
||||
def __call__(self):
|
||||
from gluon import current
|
||||
user_agent = current.request.user_agent()
|
||||
if user_agent.is_mobile:
|
||||
items = current.response.view.split('.')
|
||||
items.insert(-1, 'mobile')
|
||||
current.response.view = '.'.join(items)
|
||||
return self.func()
|
||||
|
||||
@@ -94,32 +94,10 @@ import optparse
|
||||
import time
|
||||
import sys
|
||||
import gluon.utils
|
||||
|
||||
if (sys.version_info[0] == 2):
|
||||
from urllib import urlencode, urlopen
|
||||
def to_bytes(obj, charset='utf-8', errors='strict'):
|
||||
if obj is None:
|
||||
return None
|
||||
if isinstance(obj, (bytes, bytearray, buffer)):
|
||||
return bytes(obj)
|
||||
if isinstance(obj, unicode):
|
||||
return obj.encode(charset, errors)
|
||||
raise TypeError('Expected bytes')
|
||||
else:
|
||||
from urllib.request import urlopen
|
||||
from urllib.parse import urlencode
|
||||
def to_bytes(obj, charset='utf-8', errors='strict'):
|
||||
if obj is None:
|
||||
return None
|
||||
if isinstance(obj, (bytes, bytearray, memoryview)):
|
||||
return bytes(obj)
|
||||
if isinstance(obj, str):
|
||||
return obj.encode(charset, errors)
|
||||
raise TypeError('Expected bytes')
|
||||
from gluon._compat import to_native, to_bytes, urlencode, urlopen
|
||||
|
||||
listeners, names, tokens = {}, {}, {}
|
||||
|
||||
|
||||
def websocket_send(url, message, hmac_key=None, group='default'):
|
||||
sig = hmac_key and hmac.new(to_bytes(hmac_key), to_bytes(message)).hexdigest() or ''
|
||||
params = urlencode(
|
||||
@@ -138,8 +116,8 @@ class PostHandler(tornado.web.RequestHandler):
|
||||
if hmac_key and not 'signature' in self.request.arguments:
|
||||
self.send_error(401)
|
||||
if 'message' in self.request.arguments:
|
||||
message = self.request.arguments['message'][0]
|
||||
group = self.request.arguments.get('group', ['default'])[0]
|
||||
message = self.request.arguments['message'][0].decode(encoding='UTF-8')
|
||||
group = self.request.arguments.get('group', ['default'])[0].decode(encoding='UTF-8')
|
||||
print('%s:MESSAGE to %s:%s' % (time.time(), group, message))
|
||||
if hmac_key:
|
||||
signature = self.request.arguments['signature'][0]
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Support for smart import syntax for web2py applications
|
||||
-------------------------------------------------------
|
||||
"""
|
||||
from gluon._compat import builtin, unicodeT, PY2, to_native
|
||||
from gluon._compat import builtin, unicodeT, PY2, to_native, reload
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
|
||||
99
gluon/dal.py
99
gluon/dal.py
@@ -14,6 +14,12 @@ from pydal import DAL as DAL
|
||||
from pydal import Field
|
||||
from pydal.objects import Row, Rows, Table, Query, Set, Expression
|
||||
from pydal import SQLCustomType, geoPoint, geoLine, geoPolygon
|
||||
from pydal.migrator import Migrator, InDBMigrator
|
||||
from gluon.serializers import custom_json, xml
|
||||
from gluon.utils import web2py_uuid
|
||||
from gluon import sqlhtml
|
||||
from pydal.drivers import DRIVERS
|
||||
|
||||
|
||||
def _default_validators(db, field):
|
||||
"""
|
||||
@@ -26,7 +32,11 @@ def _default_validators(db, field):
|
||||
field_type, field_length = field.type, field.length
|
||||
requires = []
|
||||
|
||||
if field_type in (('string', 'text', 'password')):
|
||||
if isinstance(field.options, list) and field.requires:
|
||||
requires = validators.IS_IN_SET(field.options, multiple=field_type.startswith('list:'))
|
||||
elif field.regex and not field.requires:
|
||||
requires.append(validators.IS_REGEX(regex))
|
||||
elif field_type in (('string', 'text', 'password')):
|
||||
requires.append(validators.IS_LENGTH(field_length))
|
||||
elif field_type == 'json':
|
||||
requires.append(validators.IS_EMPTY_OR(validators.IS_JSON()))
|
||||
@@ -44,48 +54,64 @@ def _default_validators(db, field):
|
||||
requires.append(validators.IS_TIME())
|
||||
elif field_type == 'datetime':
|
||||
requires.append(validators.IS_DATETIME())
|
||||
elif db and field_type.startswith('reference') and \
|
||||
field_type.find('.') < 0 and \
|
||||
field_type[10:] in db.tables:
|
||||
referenced = db[field_type[10:]]
|
||||
if hasattr(referenced, '_format') and referenced._format:
|
||||
requires = validators.IS_IN_DB(db, referenced._id,
|
||||
referenced._format)
|
||||
if field.unique:
|
||||
requires._and = validators.IS_NOT_IN_DB(db, field)
|
||||
if field.tablename == field_type[10:]:
|
||||
return validators.IS_EMPTY_OR(requires)
|
||||
return requires
|
||||
elif db and field_type.startswith('list:reference') and \
|
||||
field_type.find('.') < 0 and \
|
||||
field_type[15:] in db.tables:
|
||||
referenced = db[field_type[15:]]
|
||||
if hasattr(referenced, '_format') and referenced._format:
|
||||
requires = validators.IS_IN_DB(db, referenced._id,
|
||||
referenced._format, multiple=True)
|
||||
else:
|
||||
requires = validators.IS_IN_DB(db, referenced._id,
|
||||
multiple=True)
|
||||
elif db and field_type.startswith('reference'):
|
||||
if field_type.find('.') < 0 and field_type[10:] in db.tables:
|
||||
referenced = db[field_type[10:]]
|
||||
if hasattr(referenced, '_format') and referenced._format:
|
||||
requires = validators.IS_IN_DB(db, referenced._id,referenced._format)
|
||||
else:
|
||||
requires = validators.IS_IN_DB(db, referenced._id)
|
||||
elif field_type.find('.') > 0 and field_type[10:].split('.')[0] in db.tables:
|
||||
table_field = field_type[10:].split('.')
|
||||
table_name=table_field[0]
|
||||
field_name=table_field[1]
|
||||
referenced = db[table_name]
|
||||
if hasattr(referenced, '_format') and referenced._format:
|
||||
requires = validators.IS_IN_DB(db, referenced[field_name],referenced._format)
|
||||
else:
|
||||
requires = validators.IS_IN_DB(db, referenced[field_name])
|
||||
if field.unique:
|
||||
requires._and = validators.IS_NOT_IN_DB(db, field)
|
||||
if not field.notnull:
|
||||
requires = validators.IS_EMPTY_OR(requires)
|
||||
return requires
|
||||
elif db and field_type.startswith('list:reference'):
|
||||
if field_type.find('.') < 0 and field_type[15:] in db.tables:
|
||||
referenced = db[field_type[15:]]
|
||||
if hasattr(referenced, '_format') and referenced._format:
|
||||
requires = validators.IS_IN_DB(db, referenced._id,
|
||||
referenced._format, multiple=True)
|
||||
else:
|
||||
requires = validators.IS_IN_DB(db, referenced._id,
|
||||
multiple=True)
|
||||
elif field_type.find('.') > 0 and field_type[15:].split('.')[0] in db.tables:
|
||||
table_field = field_type[15:].split('.')
|
||||
table_name=table_field[0]
|
||||
field_name=table_field[1]
|
||||
referenced = db[table_name]
|
||||
if hasattr(referenced, '_format') and referenced._format:
|
||||
requires = validators.IS_IN_DB(db, referenced[field_name],
|
||||
referenced._format, multiple=True)
|
||||
else:
|
||||
requires = validators.IS_IN_DB(db, referenced[field_name],
|
||||
multiple=True)
|
||||
if field.unique:
|
||||
requires._and = validators.IS_NOT_IN_DB(db, field)
|
||||
if not field.notnull:
|
||||
requires = validators.IS_EMPTY_OR(requires)
|
||||
return requires
|
||||
# does not get here for reference and list:reference
|
||||
if field.unique:
|
||||
requires.insert(0, validators.IS_NOT_IN_DB(db, field))
|
||||
excluded_fields = ['string', 'upload', 'text', 'password', 'boolean']
|
||||
if (field.notnull or field.unique) and field_type not in excluded_fields:
|
||||
requires.insert(0, validators.IS_NOT_EMPTY())
|
||||
elif not field.notnull and not field.unique and requires:
|
||||
requires[0] = validators.IS_EMPTY_OR(requires[0], null='' if field.type in ('string', 'text', 'password') else None)
|
||||
if isinstance(requires, list):
|
||||
if field.unique:
|
||||
requires.insert(0, validators.IS_NOT_IN_DB(db, field))
|
||||
excluded_fields = ['string', 'upload', 'text', 'password', 'boolean']
|
||||
if (field.notnull or field.unique) and field_type not in excluded_fields:
|
||||
requires.insert(0, validators.IS_NOT_EMPTY())
|
||||
elif not field.notnull and not field.unique and requires:
|
||||
null = null='' if field.type in ('string', 'text', 'password') else None
|
||||
requires[0] = validators.IS_EMPTY_OR(requires[0], null=null)
|
||||
return requires
|
||||
|
||||
from gluon.serializers import custom_json, xml
|
||||
from gluon.utils import web2py_uuid
|
||||
from gluon import sqlhtml
|
||||
|
||||
|
||||
DAL.serializers = {'json': custom_json, 'xml': xml}
|
||||
DAL.validators_method = _default_validators
|
||||
DAL.uuid = lambda x: web2py_uuid()
|
||||
@@ -96,8 +122,7 @@ DAL.representers = {
|
||||
DAL.Field = Field
|
||||
DAL.Table = Table
|
||||
|
||||
#: add web2py contrib drivers to pyDAL
|
||||
from pydal.drivers import DRIVERS
|
||||
# add web2py contrib drivers to pyDAL
|
||||
if not DRIVERS.get('pymysql'):
|
||||
try:
|
||||
from .contrib import pymysql
|
||||
|
||||
@@ -15,13 +15,13 @@ import codecs
|
||||
# None represents a potentially variable byte. "##" in the XML spec...
|
||||
autodetect_dict = { # bytepattern : ("name",
|
||||
(0x00, 0x00, 0xFE, 0xFF): ("ucs4_be"),
|
||||
(0xFF, 0xFE, 0x00, 0x00): ("ucs4_le"),
|
||||
(0xFE, 0xFF, None, None): ("utf_16_be"),
|
||||
(0xFF, 0xFE, None, None): ("utf_16_le"),
|
||||
(0x00, 0x3C, 0x00, 0x3F): ("utf_16_be"),
|
||||
(0x3C, 0x00, 0x3F, 0x00): ("utf_16_le"),
|
||||
(0x3C, 0x3F, 0x78, 0x6D): ("utf_8"),
|
||||
(0x4C, 0x6F, 0xA7, 0x94): ("EBCDIC")
|
||||
(0xFF, 0xFE, 0x00, 0x00): ("ucs4_le"),
|
||||
(0xFE, 0xFF, None, None): ("utf_16_be"),
|
||||
(0xFF, 0xFE, None, None): ("utf_16_le"),
|
||||
(0x00, 0x3C, 0x00, 0x3F): ("utf_16_be"),
|
||||
(0x3C, 0x00, 0x3F, 0x00): ("utf_16_le"),
|
||||
(0x3C, 0x3F, 0x78, 0x6D): ("utf_8"),
|
||||
(0x4C, 0x6F, 0xA7, 0x94): ("EBCDIC")
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ def autoDetectXMLEncoding(buffer):
|
||||
# buffer at once but otherwise we'd have to decode a character at
|
||||
# a time looking for the quote character...that's a pain
|
||||
|
||||
encoding = "utf_8" # according to the XML spec, this is the default
|
||||
# this code successively tries to refine the default
|
||||
# whenever it fails to refine, it falls back to
|
||||
# the last place encoding was set.
|
||||
encoding = "utf_8"
|
||||
# according to the XML spec, this is the default this code successively tries to refine the default
|
||||
# whenever it fails to refine, it falls back to the last place encoding was set.
|
||||
|
||||
if len(buffer) >= 4:
|
||||
bytes = (byte1, byte2, byte3, byte4) = tuple(map(ord, buffer[0:4]))
|
||||
enc_info = autodetect_dict.get(bytes, None)
|
||||
@@ -51,8 +51,7 @@ def autoDetectXMLEncoding(buffer):
|
||||
enc_info = None
|
||||
|
||||
if enc_info:
|
||||
encoding = enc_info # we've got a guess... these are
|
||||
#the new defaults
|
||||
encoding = enc_info # we've got a guess... these are the new defaults
|
||||
|
||||
# try to find a more precise encoding using xml declaration
|
||||
secret_decoder_ring = codecs.lookup(encoding)[1]
|
||||
|
||||
@@ -415,10 +415,10 @@ def fix_newlines(path):
|
||||
|\r|
|
||||
)''')
|
||||
for filename in listdir(path, '.*\.(py|html)$', drop=False):
|
||||
rdata = read_file(filename, 'rb')
|
||||
rdata = read_file(filename, 'r')
|
||||
wdata = regex.sub('\n', rdata)
|
||||
if wdata != rdata:
|
||||
write_file(filename, wdata, 'wb')
|
||||
write_file(filename, wdata, 'w')
|
||||
|
||||
|
||||
def copystream(
|
||||
|
||||
153
gluon/globals.py
153
gluon/globals.py
@@ -13,7 +13,8 @@ Contains the classes for the global used variables:
|
||||
- Session
|
||||
|
||||
"""
|
||||
from gluon._compat import pickle, StringIO, copyreg, Cookie, urlparse, PY2, iteritems, to_unicode, to_native, unicodeT, long
|
||||
from gluon._compat import pickle, StringIO, copyreg, Cookie, urlparse, PY2, iteritems, to_unicode, to_native, \
|
||||
to_bytes, unicodeT, long, hashlib_md5, urllib_quote
|
||||
from gluon.storage import Storage, List
|
||||
from gluon.streamer import streamer, stream_file_or_304_or_206, DEFAULT_CHUNK_SIZE
|
||||
from gluon.contenttype import contenttype
|
||||
@@ -30,7 +31,7 @@ from gluon.fileutils import copystream
|
||||
import hashlib
|
||||
from pydal.contrib import portalocker
|
||||
from pickle import Pickler, MARK, DICT, EMPTY_DICT
|
||||
#from types import DictionaryType
|
||||
# from types import DictionaryType
|
||||
import datetime
|
||||
import re
|
||||
import os
|
||||
@@ -48,7 +49,7 @@ PAST = 'Sat, 1-Jan-1971 00:00:00'
|
||||
FUTURE = 'Tue, 1-Dec-2999 23:59:59'
|
||||
|
||||
try:
|
||||
#FIXME PY3
|
||||
# FIXME PY3
|
||||
from gluon.contrib.minify import minify
|
||||
have_minify = True
|
||||
except ImportError:
|
||||
@@ -79,6 +80,7 @@ template_mapping = {
|
||||
'js:inline': js_inline
|
||||
}
|
||||
|
||||
|
||||
# IMPORTANT:
|
||||
# this is required so that pickled dict(s) and class.__dict__
|
||||
# are sorted and web2py can detect without ambiguity when a session changes
|
||||
@@ -95,6 +97,7 @@ else:
|
||||
SortingPickler.dispatch_table = copyreg.dispatch_table.copy()
|
||||
SortingPickler.dispatch_table[dict] = SortingPickler.save_dict
|
||||
|
||||
|
||||
def sorting_dumps(obj, protocol=None):
|
||||
file = StringIO()
|
||||
SortingPickler(file, protocol).dump(obj)
|
||||
@@ -120,7 +123,7 @@ def copystream_progress(request, chunk_size=10 ** 5):
|
||||
dest = tempfile.NamedTemporaryFile()
|
||||
except NotImplementedError: # and GAE this
|
||||
dest = tempfile.TemporaryFile()
|
||||
if not 'X-Progress-ID' in request.get_vars:
|
||||
if 'X-Progress-ID' not in request.get_vars:
|
||||
copystream(source, dest, size, chunk_size)
|
||||
return dest
|
||||
cache_key = 'X-Progress-ID:' + request.get_vars['X-Progress-ID']
|
||||
@@ -198,7 +201,8 @@ class Request(Storage):
|
||||
"""Takes the QUERY_STRING and unpacks it to get_vars
|
||||
"""
|
||||
query_string = self.env.get('query_string', '')
|
||||
dget = urlparse.parse_qs(query_string, keep_blank_values=1) # Ref: https://docs.python.org/2/library/cgi.html#cgi.parse_qs
|
||||
dget = urlparse.parse_qs(query_string, keep_blank_values=1)
|
||||
# Ref: https://docs.python.org/2/library/cgi.html#cgi.parse_qs
|
||||
get_vars = self._get_vars = Storage(dget)
|
||||
for (key, value) in iteritems(get_vars):
|
||||
if isinstance(value, list) and len(value) == 1:
|
||||
@@ -216,7 +220,12 @@ class Request(Storage):
|
||||
|
||||
if is_json:
|
||||
try:
|
||||
json_vars = json_parser.load(body)
|
||||
# In Python 3 versions prior to 3.6 load doesn't accept bytes and
|
||||
# bytearray, so we read the body convert to native and use loads
|
||||
# instead of load.
|
||||
# This line can be simplified to json_vars = json_parser.load(body)
|
||||
# if and when we drop support for python versions under 3.6
|
||||
json_vars = json_parser.loads(to_native(body.read()))
|
||||
except:
|
||||
# incoherent request bodies can still be parsed "ad-hoc"
|
||||
json_vars = {}
|
||||
@@ -228,8 +237,7 @@ class Request(Storage):
|
||||
body.seek(0)
|
||||
|
||||
# parse POST variables on POST, PUT, BOTH only in post_vars
|
||||
if (body and not is_json
|
||||
and env.request_method in ('POST', 'PUT', 'DELETE', 'BOTH')):
|
||||
if body and not is_json and env.request_method in ('POST', 'PUT', 'DELETE', 'BOTH'):
|
||||
query_string = env.pop('QUERY_STRING', None)
|
||||
dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
|
||||
try:
|
||||
@@ -328,11 +336,16 @@ class Request(Storage):
|
||||
user_agent = session._user_agent
|
||||
if user_agent:
|
||||
return user_agent
|
||||
user_agent = user_agent_parser.detect(self.env.http_user_agent)
|
||||
http_user_agent = self.env.http_user_agent or ''
|
||||
user_agent = user_agent_parser.detect(http_user_agent)
|
||||
for key, value in user_agent.items():
|
||||
if isinstance(value, dict):
|
||||
user_agent[key] = Storage(value)
|
||||
user_agent = session._user_agent = Storage(user_agent)
|
||||
user_agent = Storage(user_agent)
|
||||
user_agent.is_mobile = 'Mobile' in http_user_agent
|
||||
user_agent.is_tablet = 'Tablet' in http_user_agent
|
||||
session._user_agent = user_agent
|
||||
|
||||
return user_agent
|
||||
|
||||
def requires_https(self):
|
||||
@@ -355,7 +368,7 @@ class Request(Storage):
|
||||
def f(_action=action, *a, **b):
|
||||
request.is_restful = True
|
||||
env = request.env
|
||||
is_json = env.content_type=='application/json'
|
||||
is_json = env.content_type == 'application/json'
|
||||
method = env.request_method
|
||||
if not ignore_extension and len(request.args) and '.' in request.args[-1]:
|
||||
request.args[-1], _, request.extension = request.args[-1].rpartition('.')
|
||||
@@ -451,13 +464,13 @@ class Response(Storage):
|
||||
for meta in iteritems((self.meta or {})):
|
||||
k, v = meta
|
||||
if isinstance(v, dict):
|
||||
s += '<meta' + ''.join(' %s="%s"' % (xmlescape(key), to_native(xmlescape(v[key]))) for key in v) +' />\n'
|
||||
s += '<meta' + ''.join(' %s="%s"' % (to_native(xmlescape(key)),
|
||||
to_native(xmlescape(v[key]))) for key in v) + ' />\n'
|
||||
else:
|
||||
s += '<meta name="%s" content="%s" />\n' % (k, to_native(xmlescape(v)))
|
||||
self.write(s, escape=False)
|
||||
|
||||
def include_files(self, extensions=None):
|
||||
|
||||
"""
|
||||
Includes files (usually in the head).
|
||||
Can minify and cache local files
|
||||
@@ -465,46 +478,67 @@ class Response(Storage):
|
||||
response.cache_includes = (cache_method, time_expire).
|
||||
Example: (cache.disk, 60) # caches to disk for 1 minute.
|
||||
"""
|
||||
app = current.request.application
|
||||
|
||||
# We start by building a files list in which adjacent files internal to
|
||||
# the application are placed in a list inside the files list.
|
||||
#
|
||||
# We will only minify and concat adjacent internal files as there's
|
||||
# no way to know if changing the order with which the files are apppended
|
||||
# will break things since the order matters in both CSS and JS and
|
||||
# internal files may be interleaved with external ones.
|
||||
files = []
|
||||
ext_files = []
|
||||
has_js = has_css = False
|
||||
# For the adjacent list we're going to use storage List to both distinguish
|
||||
# from the regular list and so we can add attributes
|
||||
internal = List()
|
||||
internal.has_js = False
|
||||
internal.has_css = False
|
||||
done = set() # to remove duplicates
|
||||
for item in self.files:
|
||||
if isinstance(item, (list, tuple)):
|
||||
ext_files.append(item)
|
||||
if not isinstance(item, list):
|
||||
if item in done:
|
||||
continue
|
||||
done.add(item)
|
||||
if isinstance(item, (list, tuple)) or not item.startswith('/' + app): # also consider items in other web2py applications to be external
|
||||
if internal:
|
||||
files.append(internal)
|
||||
internal = List()
|
||||
internal.has_js = False
|
||||
internal.has_css = False
|
||||
files.append(item)
|
||||
continue
|
||||
if extensions and not item.rpartition('.')[2] in extensions:
|
||||
continue
|
||||
if item in files:
|
||||
continue
|
||||
internal.append(item)
|
||||
if item.endswith('.js'):
|
||||
has_js = True
|
||||
internal.has_js = True
|
||||
if item.endswith('.css'):
|
||||
has_css = True
|
||||
files.append(item)
|
||||
internal.has_css = True
|
||||
if internal:
|
||||
files.append(internal)
|
||||
|
||||
if have_minify and ((self.optimize_css and has_css) or (self.optimize_js and has_js)):
|
||||
# cache for 5 minutes by default
|
||||
key = hashlib.md5(repr(files)).hexdigest()
|
||||
# We're done we can now minify
|
||||
if have_minify:
|
||||
for i, f in enumerate(files):
|
||||
if isinstance(f, List) and ((self.optimize_css and f.has_css) or (self.optimize_js and f.has_js)):
|
||||
# cache for 5 minutes by default
|
||||
key = hashlib_md5(repr(f)).hexdigest()
|
||||
cache = self.cache_includes or (current.cache.ram, 60 * 5)
|
||||
def call_minify(files=f):
|
||||
return List(minify.minify(files,
|
||||
URL('static', 'temp'),
|
||||
current.request.folder,
|
||||
self.optimize_css,
|
||||
self.optimize_js))
|
||||
if cache:
|
||||
cache_model, time_expire = cache
|
||||
files[i] = cache_model('response.files.minified/' + key,
|
||||
call_minify,
|
||||
time_expire)
|
||||
else:
|
||||
files[i] = call_minify()
|
||||
|
||||
cache = self.cache_includes or (current.cache.ram, 60 * 5)
|
||||
|
||||
def call_minify(files=files):
|
||||
return minify.minify(files,
|
||||
URL('static', 'temp'),
|
||||
current.request.folder,
|
||||
self.optimize_css,
|
||||
self.optimize_js)
|
||||
if cache:
|
||||
cache_model, time_expire = cache
|
||||
files = cache_model('response.files.minified/' + key,
|
||||
call_minify,
|
||||
time_expire)
|
||||
else:
|
||||
files = call_minify()
|
||||
|
||||
files.extend(ext_files)
|
||||
s = []
|
||||
for item in files:
|
||||
def static_map(s, item):
|
||||
if isinstance(item, str):
|
||||
f = item.lower().split('?')[0]
|
||||
ext = f.rpartition('.')[2]
|
||||
@@ -523,6 +557,14 @@ class Response(Storage):
|
||||
tmpl = template_mapping.get(f)
|
||||
if tmpl:
|
||||
s.append(tmpl % item[1])
|
||||
|
||||
s = []
|
||||
for item in files:
|
||||
if isinstance(item, List):
|
||||
for f in item:
|
||||
static_map(s, f)
|
||||
else:
|
||||
static_map(s, item)
|
||||
self.write(''.join(s), escape=False)
|
||||
|
||||
def stream(self,
|
||||
@@ -563,7 +605,7 @@ class Response(Storage):
|
||||
else:
|
||||
attname = filename
|
||||
headers["Content-Disposition"] = \
|
||||
'attachment;filename="%s"' % attname
|
||||
'attachment; filename="%s"' % attname
|
||||
|
||||
if not request:
|
||||
request = current.request
|
||||
@@ -578,9 +620,9 @@ class Response(Storage):
|
||||
if hasattr(stream, 'name'):
|
||||
filename = stream.name
|
||||
|
||||
if filename and not 'content-type' in keys:
|
||||
if filename and 'content-type' not in keys:
|
||||
headers['Content-Type'] = contenttype(filename)
|
||||
if filename and not 'content-length' in keys:
|
||||
if filename and 'content-length' not in keys:
|
||||
try:
|
||||
headers['Content-Length'] = \
|
||||
os.path.getsize(filename)
|
||||
@@ -638,8 +680,13 @@ class Response(Storage):
|
||||
if download_filename is None:
|
||||
download_filename = filename
|
||||
if attachment:
|
||||
# Browsers still don't have a simple uniform way to have non ascii
|
||||
# characters in the filename so for now we are percent encoding it
|
||||
if isinstance(download_filename, unicodeT):
|
||||
download_filename = download_filename.encode('utf-8')
|
||||
download_filename = urllib_quote(download_filename)
|
||||
headers['Content-Disposition'] = \
|
||||
'attachment; filename="%s"' % download_filename.replace('"', '\"')
|
||||
'attachment; filename="%s"' % download_filename.replace('"', '\\"')
|
||||
return self.stream(stream, chunk_size=chunk_size, request=request)
|
||||
|
||||
def json(self, data, default=None, indent=None):
|
||||
@@ -920,7 +967,7 @@ class Session(Storage):
|
||||
if row:
|
||||
# rows[0].update_record(locked=True)
|
||||
# Unpickle the data
|
||||
session_data = pickle.loads(row.session_data)
|
||||
session_data = pickle.loads(row[b'session_data'])
|
||||
self.update(session_data)
|
||||
response.session_new = False
|
||||
else:
|
||||
@@ -1002,7 +1049,7 @@ class Session(Storage):
|
||||
if record_id.isdigit() and long(record_id) > 0:
|
||||
new_unique_key = web2py_uuid()
|
||||
row = table(record_id)
|
||||
if row and row.unique_key == unique_key:
|
||||
if row and row[b'unique_key'] == to_bytes(unique_key):
|
||||
table._db(table.id == record_id).update(unique_key=new_unique_key)
|
||||
else:
|
||||
record_id = None
|
||||
@@ -1022,7 +1069,7 @@ class Session(Storage):
|
||||
if self._forget:
|
||||
del rcookies[response.session_id_name]
|
||||
return
|
||||
if self.get('httponly_cookies',True):
|
||||
if self.get('httponly_cookies', True):
|
||||
scookies['HttpOnly'] = True
|
||||
if self._secure:
|
||||
scookies['secure'] = True
|
||||
@@ -1120,7 +1167,7 @@ class Session(Storage):
|
||||
compression_level=compression_level)
|
||||
rcookies = response.cookies
|
||||
rcookies.pop(name, None)
|
||||
rcookies[name] = value
|
||||
rcookies[name] = to_native(value)
|
||||
rcookies[name]['path'] = '/'
|
||||
expires = response.session_cookie_expires
|
||||
if isinstance(expires, datetime.datetime):
|
||||
@@ -1193,7 +1240,7 @@ class Session(Storage):
|
||||
if (not response.session_id or
|
||||
not response.session_filename or
|
||||
self._forget
|
||||
or self._unchanged(response)):
|
||||
or self._unchanged(response)):
|
||||
# self.clear_session_cookies()
|
||||
return False
|
||||
else:
|
||||
|
||||
@@ -27,7 +27,7 @@ class Highlighter(object):
|
||||
):
|
||||
"""
|
||||
Initialize highlighter:
|
||||
mode = language (PYTHON, WEB2PY,C, CPP, HTML, HTML_PLAIN)
|
||||
mode = language (PYTHON, WEB2PY, C, CPP, HTML, HTML_PLAIN)
|
||||
"""
|
||||
styles = styles or {}
|
||||
mode = mode.upper()
|
||||
@@ -182,8 +182,8 @@ class Highlighter(object):
|
||||
)),
|
||||
'PYTHONMultilineString': (python_tokenizer,
|
||||
(('ENDMULTILINESTRING',
|
||||
re.compile(r'.*?("""|\'\'\')',
|
||||
re.DOTALL), 'color: darkred'), )),
|
||||
re.compile(r'.*?("""|\'\'\')',
|
||||
re.DOTALL), 'color: darkred'), )),
|
||||
'HTML': (html_tokenizer, (
|
||||
('GOTOPYTHON', re.compile(r'\{\{'), 'color: red'),
|
||||
('COMMENT', re.compile(r'<!--[^>]*-->|<!>'),
|
||||
@@ -209,7 +209,7 @@ class Highlighter(object):
|
||||
mode = self.mode
|
||||
while i < len(data):
|
||||
for (token, o_re, style) in Highlighter.all_styles[mode][1]:
|
||||
if not token in self.suppress_tokens:
|
||||
if token not in self.suppress_tokens:
|
||||
match = o_re.match(data, i)
|
||||
if match:
|
||||
if style:
|
||||
@@ -221,7 +221,7 @@ class Highlighter(object):
|
||||
new_mode = \
|
||||
Highlighter.all_styles[mode][0](self,
|
||||
token, match, style)
|
||||
if not new_mode is None:
|
||||
if new_mode is not None:
|
||||
mode = new_mode
|
||||
i += max(1, len(match.group()))
|
||||
break
|
||||
@@ -241,9 +241,9 @@ class Highlighter(object):
|
||||
style = self.styles[token]
|
||||
if self.span_style != style:
|
||||
if style != 'Keep':
|
||||
if not self.span_style is None:
|
||||
if self.span_style is not None:
|
||||
self.output.append('</span>')
|
||||
if not style is None:
|
||||
if style is not None:
|
||||
self.output.append('<span style="%s">' % style)
|
||||
self.span_style = style
|
||||
|
||||
@@ -260,33 +260,27 @@ def highlight(
|
||||
):
|
||||
styles = styles or {}
|
||||
attributes = attributes or {}
|
||||
if not 'CODE' in styles:
|
||||
code_style = """
|
||||
font-size: 11px;
|
||||
font-family: Bitstream Vera Sans Mono,monospace;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
border: none;
|
||||
overflow: auto;
|
||||
white-space: pre !important;\n"""
|
||||
else:
|
||||
code_style = styles['CODE']
|
||||
if not 'LINENUMBERS' in styles:
|
||||
linenumbers_style = """
|
||||
font-size: 11px;
|
||||
font-family: Bitstream Vera Sans Mono,monospace;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
border: none;
|
||||
color: #A0A0A0;\n"""
|
||||
else:
|
||||
linenumbers_style = styles['LINENUMBERS']
|
||||
if not 'LINEHIGHLIGHT' in styles:
|
||||
linehighlight_style = "background-color: #EBDDE2;"
|
||||
else:
|
||||
linehighlight_style = styles['LINEHIGHLIGHT']
|
||||
code_style = styles.get('CODE', None) or '''
|
||||
font-size: 11px;
|
||||
font-family: Bitstream Vera Sans Mono,monospace;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
border: none;
|
||||
overflow: auto;
|
||||
white-space: pre !important;
|
||||
'''
|
||||
linenumbers_style = styles.get('LINENUMBERS', None) or '''
|
||||
font-size: 11px;
|
||||
font-family: Bitstream Vera Sans Mono,monospace;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
border: none;
|
||||
color: #A0A0A0;
|
||||
'''
|
||||
linehighlight_style = styles.get('LINEHIGHLIGHT', None) or \
|
||||
'background-color: #EBDDE2;'
|
||||
|
||||
if language and language.upper() in ['PYTHON', 'C', 'CPP', 'HTML',
|
||||
'WEB2PY']:
|
||||
@@ -309,18 +303,20 @@ def highlight(
|
||||
else:
|
||||
lineno = highlight_line
|
||||
if lineno < len(lines):
|
||||
lines[lineno] = '<div style="%s">%s</div>' % (
|
||||
lines[lineno] = '<span style="%s">%s</span>' % (
|
||||
linehighlight_style, lines[lineno])
|
||||
linenumbers[lineno] = '<div style="%s">%s</div>' % (
|
||||
linenumbers[lineno] = '<span style="%s">%s</span>' % (
|
||||
linehighlight_style, linenumbers[lineno])
|
||||
|
||||
if context_lines:
|
||||
if lineno + context_lines < len(lines):
|
||||
del lines[lineno + context_lines:]
|
||||
del linenumbers[lineno + context_lines:]
|
||||
delslice = slice(lineno + context_lines + 1, len(lines))
|
||||
del lines[delslice]
|
||||
del linenumbers[delslice]
|
||||
if lineno - context_lines > 0:
|
||||
del lines[0:lineno - context_lines]
|
||||
del linenumbers[0:lineno - context_lines]
|
||||
delslice = slice(0, lineno - context_lines)
|
||||
del lines[delslice]
|
||||
del linenumbers[delslice]
|
||||
|
||||
code = '<br/>'.join(lines)
|
||||
numbers = '<br/>'.join(linenumbers)
|
||||
@@ -333,8 +329,9 @@ def highlight(
|
||||
== '_' and value])
|
||||
if fa:
|
||||
fa = ' ' + fa
|
||||
return '<table%s><tr style="vertical-align:top;"><td style="min-width:40px; text-align: right;"><pre style="%s">%s</pre></td><td><pre style="%s">%s</pre></td></tr></table>'\
|
||||
% (fa, linenumbers_style, numbers, code_style, code)
|
||||
return '<table%s><tr style="vertical-align:top;">' \
|
||||
'<td style="min-width:40px; text-align: right;"><pre style="%s">%s</pre></td>' \
|
||||
'<td><pre style="%s">%s</pre></td></tr></table>' % (fa, linenumbers_style, numbers, code_style, code)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
@@ -342,5 +339,4 @@ if __name__ == '__main__':
|
||||
argfp = open(sys.argv[1])
|
||||
data = argfp.read()
|
||||
argfp.close()
|
||||
print('<html><body>' + highlight(data, sys.argv[2])\
|
||||
+ '</body></html>')
|
||||
print('<html><body>' + highlight(data, sys.argv[2]) + '</body></html>')
|
||||
|
||||
@@ -20,7 +20,8 @@ import urllib
|
||||
import base64
|
||||
from gluon import sanitizer, decoder
|
||||
import itertools
|
||||
from gluon._compat import reduce, pickle, copyreg, HTMLParser, name2codepoint, iteritems, unichr, unicodeT, urllib_quote, to_bytes, to_native, to_unicode, basestring, urlencode, implements_bool, text_type, long
|
||||
from gluon._compat import reduce, pickle, copyreg, HTMLParser, name2codepoint, iteritems, unichr, unicodeT, \
|
||||
urllib_quote, to_bytes, to_native, to_unicode, basestring, urlencode, implements_bool, text_type, long
|
||||
from gluon.utils import local_html_escape
|
||||
import marshal
|
||||
|
||||
@@ -109,6 +110,7 @@ __all__ = [
|
||||
|
||||
DEFAULT_PASSWORD_DISPLAY = '*' * 8
|
||||
|
||||
|
||||
def xmlescape(data, quote=True):
|
||||
"""
|
||||
Returns an escaped string of the provided data
|
||||
@@ -124,10 +126,9 @@ def xmlescape(data, quote=True):
|
||||
|
||||
if not(isinstance(data, (text_type, bytes))):
|
||||
# i.e., integers
|
||||
data=str(data)
|
||||
data = str(data)
|
||||
data = to_bytes(data, 'utf8', 'xmlcharrefreplace')
|
||||
|
||||
|
||||
# ... and do the escaping
|
||||
data = local_html_escape(data, quote)
|
||||
return data
|
||||
@@ -671,6 +672,7 @@ def XML_pickle(data):
|
||||
return XML_unpickle, (marshal.dumps(str(data)),)
|
||||
copyreg.pickle(XML, XML_pickle, XML_unpickle)
|
||||
|
||||
|
||||
@implements_bool
|
||||
class DIV(XmlComponent):
|
||||
"""
|
||||
@@ -1309,8 +1311,10 @@ class HTML(DIV):
|
||||
tag = b'html'
|
||||
|
||||
strict = b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n'
|
||||
transitional = b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'
|
||||
frameset = b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">\n'
|
||||
transitional = \
|
||||
b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'
|
||||
frameset = \
|
||||
b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">\n'
|
||||
html5 = b'<!DOCTYPE HTML>\n'
|
||||
|
||||
def xml(self):
|
||||
@@ -1415,20 +1419,21 @@ class LINK(DIV):
|
||||
|
||||
class SCRIPT(DIV):
|
||||
|
||||
tag = 'script'
|
||||
tag = b'script'
|
||||
tagname = to_bytes(tag)
|
||||
|
||||
def xml(self):
|
||||
(fa, co) = self._xml()
|
||||
fa = to_native(fa)
|
||||
fa = to_bytes(fa)
|
||||
# no escaping of subcomponents
|
||||
co = '\n'.join([str(component) for component in
|
||||
co = b'\n'.join([to_bytes(component) for component in
|
||||
self.components])
|
||||
if co:
|
||||
# <script [attributes]><!--//--><![CDATA[//><!--
|
||||
# script body
|
||||
# //--><!]]></script>
|
||||
# return '<%s%s><!--//--><![CDATA[//><!--\n%s\n//--><!]]></%s>' % (self.tag, fa, co, self.tag)
|
||||
return '<%s%s><!--\n%s\n//--></%s>' % (self.tag, fa, co, self.tag)
|
||||
return b'<%s%s><!--\n%s\n//--></%s>' % (self.tagname, fa, co, self.tagname)
|
||||
else:
|
||||
return DIV.xml(self)
|
||||
|
||||
@@ -1436,18 +1441,19 @@ class SCRIPT(DIV):
|
||||
class STYLE(DIV):
|
||||
|
||||
tag = 'style'
|
||||
tagname = to_bytes(tag)
|
||||
|
||||
def xml(self):
|
||||
(fa, co) = self._xml()
|
||||
fa = to_native(fa)
|
||||
fa = to_bytes(fa)
|
||||
# no escaping of subcomponents
|
||||
co = '\n'.join([str(component) for component in
|
||||
co = b'\n'.join([to_bytes(component) for component in
|
||||
self.components])
|
||||
if co:
|
||||
# <style [attributes]><!--/*--><![CDATA[/*><!--*/
|
||||
# style body
|
||||
# /*]]>*/--></style>
|
||||
return '<%s%s><!--/*--><![CDATA[/*><!--*/\n%s\n/*]]>*/--></%s>' % (self.tag, fa, co, self.tag)
|
||||
return b'<%s%s><!--/*--><![CDATA[/*><!--*/\n%s\n/*]]>*/--></%s>' % (self.tagname, fa, co, self.tagname)
|
||||
else:
|
||||
return DIV.xml(self)
|
||||
|
||||
@@ -1861,7 +1867,7 @@ class INPUT(DIV):
|
||||
except:
|
||||
import traceback
|
||||
print(traceback.format_exc())
|
||||
msg = "Validation error, field:%s %s" % (name,validator)
|
||||
msg = "Validation error, field:%s %s" % (name, validator)
|
||||
raise Exception(msg)
|
||||
if errors is not None:
|
||||
self.vars[name] = value
|
||||
@@ -1911,7 +1917,7 @@ class INPUT(DIV):
|
||||
name = self.attributes.get('_name', None)
|
||||
if name and hasattr(self, 'errors') \
|
||||
and self.errors.get(name, None) \
|
||||
and self['hideerror'] != True:
|
||||
and self['hideerror'] is not True:
|
||||
self['_class'] = (self['_class'] and self['_class'] + ' ' or '') + 'invalidinput'
|
||||
return DIV.xml(self) + DIV(
|
||||
DIV(
|
||||
@@ -1979,7 +1985,6 @@ class OPTGROUP(DIV):
|
||||
|
||||
|
||||
class SELECT(INPUT):
|
||||
|
||||
"""
|
||||
Examples:
|
||||
|
||||
@@ -2014,7 +2019,7 @@ class SELECT(INPUT):
|
||||
if value is not None:
|
||||
if not self['_multiple']:
|
||||
for c in options: # my patch
|
||||
if ((value is not None) and (str(c['_value']) == str(value))):
|
||||
if (value is not None) and (str(c['_value']) == str(value)):
|
||||
c['_selected'] = 'selected'
|
||||
else:
|
||||
c['_selected'] = None
|
||||
@@ -2024,7 +2029,7 @@ class SELECT(INPUT):
|
||||
else:
|
||||
values = [str(value)]
|
||||
for c in options: # my patch
|
||||
if ((value is not None) and (str(c['_value']) in values)):
|
||||
if (value is not None) and (str(c['_value']) in values):
|
||||
c['_selected'] = 'selected'
|
||||
else:
|
||||
c['_selected'] = None
|
||||
@@ -2390,7 +2395,6 @@ class FORM(DIV):
|
||||
|
||||
|
||||
class BEAUTIFY(DIV):
|
||||
|
||||
"""
|
||||
Turns any list, dictionary, etc into decent looking html.
|
||||
|
||||
@@ -2429,7 +2433,7 @@ class BEAUTIFY(DIV):
|
||||
if level == 0:
|
||||
return
|
||||
for c in self.components:
|
||||
if hasattr(c, 'value') and not callable(c.value):
|
||||
if hasattr(c, 'value') and not callable(c.value) and not isinstance(c, cgi.FieldStorage):
|
||||
if c.value:
|
||||
components.append(c.value)
|
||||
if hasattr(c, 'xml') and callable(c.xml):
|
||||
@@ -2547,7 +2551,7 @@ class MENU(DIV):
|
||||
li['_class'] = li['_class'] + ' ' + self['li_active']
|
||||
else:
|
||||
li['_class'] = self['li_active']
|
||||
if len(item) <= 4 or item[4] == True:
|
||||
if len(item) <= 4 or item[4] is True:
|
||||
ul.append(li)
|
||||
return ul
|
||||
|
||||
@@ -2561,7 +2565,7 @@ class MENU(DIV):
|
||||
# ex: ('', False, A('title', _href=URL(...), _title="title"))
|
||||
# ex: (A('title', _href=URL(...), _title="title"), False, None)
|
||||
custom_items.append(item)
|
||||
elif len(item) <= 4 or item[4] == True:
|
||||
elif len(item) <= 4 or item[4] is True:
|
||||
select.append(OPTION(CAT(prefix, item[0]),
|
||||
_value=item[2], _selected=item[1]))
|
||||
if len(item) > 3 and len(item[3]):
|
||||
@@ -2703,7 +2707,8 @@ class web2pyHTMLParser(HTMLParser):
|
||||
self.parent = self.parent.parent
|
||||
except:
|
||||
raise RuntimeError("unable to balance tag %s" % tagname)
|
||||
if parent_tagname[:len(tagname)] == tagname: break
|
||||
if parent_tagname[:len(tagname)] == tagname:
|
||||
break
|
||||
|
||||
|
||||
def markdown_serializer(text, tag=None, attr=None):
|
||||
|
||||
@@ -11,7 +11,7 @@ HTTP statuses helpers
|
||||
"""
|
||||
|
||||
import re
|
||||
from gluon._compat import iteritems
|
||||
from gluon._compat import iteritems, unicodeT, to_bytes
|
||||
|
||||
__all__ = ['HTTP', 'redirect']
|
||||
|
||||
@@ -111,22 +111,29 @@ class HTTP(Exception):
|
||||
if not body:
|
||||
body = status
|
||||
if isinstance(body, (str, bytes, bytearray)):
|
||||
if isinstance(body, unicodeT):
|
||||
body = to_bytes(body) # This must be done before len
|
||||
headers['Content-Length'] = len(body)
|
||||
rheaders = []
|
||||
for k, v in iteritems(headers):
|
||||
if isinstance(v, list):
|
||||
rheaders += [(k, str(item)) for item in v]
|
||||
elif not v is None:
|
||||
elif v is not None:
|
||||
rheaders.append((k, str(v)))
|
||||
responder(status, rheaders)
|
||||
if env.get('request_method', '') == 'HEAD':
|
||||
return ['']
|
||||
elif isinstance(body, (str, bytes, bytearray)):
|
||||
if isinstance(body, unicodeT):
|
||||
body = to_bytes(body)
|
||||
return [body]
|
||||
elif hasattr(body, '__iter__'):
|
||||
return body
|
||||
else:
|
||||
return [str(body)]
|
||||
body = str(body)
|
||||
if isinstance(body, unicodeT):
|
||||
body = to_bytes(body)
|
||||
return [body]
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
@@ -148,7 +155,7 @@ class HTTP(Exception):
|
||||
web2py_error=self.headers.get('web2py_error'))
|
||||
|
||||
def __str__(self):
|
||||
"stringify me"
|
||||
"""stringify me"""
|
||||
return self.message
|
||||
|
||||
|
||||
|
||||
@@ -78,13 +78,9 @@ alert_dependency = ['hashlib', 'uuid']
|
||||
# Now we remove the blacklisted modules if we are using the stated
|
||||
# python version.
|
||||
#
|
||||
# List of modules deprecated in Python 2.6 or 2.7 that are in the above set
|
||||
# List of modules deprecated in Python 2.7 that are in the above list
|
||||
py27_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter'] # And ['optparse'] but we need it for now
|
||||
|
||||
if python_version >= '2.6':
|
||||
base_modules += ['json', 'multiprocessing']
|
||||
base_modules = list(set(base_modules).difference(set(py26_deprecated)))
|
||||
|
||||
if python_version >= '2.7':
|
||||
base_modules += ['argparse', 'json', 'multiprocessing']
|
||||
base_modules = list(set(base_modules).difference(set(py27_deprecated)))
|
||||
|
||||
@@ -18,10 +18,11 @@ import pkgutil
|
||||
import logging
|
||||
from cgi import escape
|
||||
from threading import RLock
|
||||
from gluon.utf8 import Utf8
|
||||
|
||||
from gluon.utils import local_html_escape
|
||||
|
||||
from gluon._compat import copyreg, PY2, maketrans, iterkeys, unicodeT, to_unicode, to_bytes, iteritems, to_native, pjoin
|
||||
|
||||
from pydal.contrib.portalocker import read_locked, LockedFile
|
||||
|
||||
from gluon.fileutils import listdir
|
||||
@@ -49,8 +50,10 @@ DEFAULT_CONSTRUCT_PLURAL_FORM = lambda word, plural_id: word
|
||||
|
||||
if PY2:
|
||||
NUMBERS = (int, long, float)
|
||||
from gluon.utf8 import Utf8
|
||||
else:
|
||||
NUMBERS = (int, float)
|
||||
Utf8 = str
|
||||
|
||||
# pattern to find T(blah blah blah) expressions
|
||||
PY_STRING_LITERAL_RE = r'(?<=[^\w]T\()(?P<name>'\
|
||||
@@ -107,15 +110,17 @@ def markmin(s):
|
||||
|
||||
|
||||
def upper_fun(s):
|
||||
return unicode(s, 'utf-8').upper().encode('utf-8')
|
||||
return to_bytes(to_unicode(s).upper())
|
||||
|
||||
|
||||
def title_fun(s):
|
||||
return unicode(s, 'utf-8').title().encode('utf-8')
|
||||
return to_bytes(to_unicode(s).title())
|
||||
|
||||
|
||||
def cap_fun(s):
|
||||
return unicode(s, 'utf-8').capitalize().encode('utf-8')
|
||||
return to_bytes(to_unicode(s).capitalize())
|
||||
|
||||
|
||||
ttab_in = maketrans("\\%{}", '\x1c\x1d\x1e\x1f')
|
||||
ttab_out = maketrans('\x1c\x1d\x1e\x1f', "\\%{}")
|
||||
|
||||
@@ -426,10 +431,16 @@ class lazyT(object):
|
||||
return str(self) if self.M else local_html_escape(str(self), quote=False)
|
||||
|
||||
def encode(self, *a, **b):
|
||||
return str(self).encode(*a, **b)
|
||||
if PY2 and a[0] != 'utf8':
|
||||
return to_unicode(str(self)).encode(*a, **b)
|
||||
else:
|
||||
return str(self)
|
||||
|
||||
def decode(self, *a, **b):
|
||||
return str(self).decode(*a, **b)
|
||||
if PY2:
|
||||
return str(self).decode(*a, **b)
|
||||
else:
|
||||
return str(self)
|
||||
|
||||
def read(self):
|
||||
return str(self)
|
||||
@@ -787,7 +798,7 @@ class translator(object):
|
||||
"""
|
||||
Use ## to add a comment into a translation string
|
||||
the comment can be useful do discriminate different possible
|
||||
translations for the same string (for example different locations)::
|
||||
translations for the same string (for example different locations):
|
||||
|
||||
T(' hello world ') -> ' hello world '
|
||||
T(' hello world ## token') -> ' hello world '
|
||||
@@ -830,24 +841,71 @@ class translator(object):
|
||||
"""
|
||||
def sub_plural(m):
|
||||
"""String in `%{}` is transformed by this rules:
|
||||
If string starts with `\\`, `!` or `?` such transformations
|
||||
take place::
|
||||
If string starts with `!` or `?` such transformations
|
||||
take place:
|
||||
|
||||
"!string of words" -> "String of word" (Capitalize)
|
||||
"!!string of words" -> "String Of Word" (Title)
|
||||
"!!!string of words" -> "STRING OF WORD" (Upper)
|
||||
"\\!string of words" -> "!string of word"
|
||||
(remove \\ and disable transformations)
|
||||
"?word?number" -> "word" (return word, if number == 1)
|
||||
"?number" or "??number" -> "" (remove number,
|
||||
if number == 1)
|
||||
"?word?number" -> "number" (if number != 1)
|
||||
|
||||
"?word1?number" -> "word1" or "number"
|
||||
(return word1 if number == 1,
|
||||
return number otherwise)
|
||||
"??number" or "?number" -> "" or "number"
|
||||
(as above with word1 = "")
|
||||
|
||||
"?word1?number?word0" -> "word1" or "number" or "word0"
|
||||
(return word1 if number == 1,
|
||||
return word0 if number == 0,
|
||||
return number otherwise)
|
||||
"?word1?number?" -> "word1" or "number" or ""
|
||||
(as above with word0 = "")
|
||||
"??number?word0" -> "number" or "word0"
|
||||
(as above with word1 = "")
|
||||
"??number?" -> "number" or ""
|
||||
(as above with word1 = word0 = "")
|
||||
|
||||
"?word1?word[number]" -> "word1" or "word"
|
||||
(return word1 if symbols[number] == 1,
|
||||
return word otherwise)
|
||||
"?word1?[number]" -> "" or "word1"
|
||||
(as above with word = "")
|
||||
"??word[number]" or "?word[number]" -> "" or "word"
|
||||
(as above with word1 = "")
|
||||
|
||||
"?word1?word?word0[number]" -> "word1" or "word" or "word0"
|
||||
(return word1 if symbols[number] == 1,
|
||||
return word0 if symbols[number] == 0,
|
||||
return word otherwise)
|
||||
"?word1?word?[number]" -> "word1" or "word" or ""
|
||||
(as above with word0 = "")
|
||||
"??word?word0[number]" -> "" or "word" or "word0"
|
||||
(as above with word1 = "")
|
||||
"??word?[number]" -> "" or "word"
|
||||
(as above with word1 = word0 = "")
|
||||
|
||||
Other strings, (those not starting with `!` or `?`)
|
||||
are processed by self.plural
|
||||
"""
|
||||
def sub_tuple(m):
|
||||
""" word[number], !word[number], !!word[number], !!!word[number]
|
||||
word, !word, !!word, !!!word, ?word?number, ??number, ?number
|
||||
?word?word[number], ?word?[number], ??word[number]
|
||||
""" word
|
||||
!word, !!word, !!!word
|
||||
?word1?number
|
||||
??number, ?number
|
||||
?word1?number?word0
|
||||
?word1?number?
|
||||
??number?word0
|
||||
??number?
|
||||
|
||||
word[number]
|
||||
!word[number], !!word[number], !!!word[number]
|
||||
?word1?word[number]
|
||||
?word1?[number]
|
||||
??word[number], ?word[number]
|
||||
?word1?word?word0[number]
|
||||
?word1?word?[number]
|
||||
??word?word0[number]
|
||||
??word?[number]
|
||||
"""
|
||||
w, i = m.group('w', 'i')
|
||||
c = w[0]
|
||||
@@ -865,7 +923,7 @@ class translator(object):
|
||||
return m.group(0)
|
||||
num = int(part2)
|
||||
else:
|
||||
# ?[word]?word2[?word3][number]
|
||||
# ?[word1]?word[?word0][number]
|
||||
num = int(symbols[int(i or 0)])
|
||||
return part1 if num == 1 else part3 if num == 0 else part2
|
||||
elif w.startswith('!!!'):
|
||||
@@ -882,10 +940,15 @@ class translator(object):
|
||||
return fun(word)
|
||||
|
||||
def sub_dict(m):
|
||||
""" word(var), !word(var), !!word(var), !!!word(var)
|
||||
word(num), !word(num), !!word(num), !!!word(num)
|
||||
?word2(var), ?word1?word2(var), ?word1?word2?word0(var)
|
||||
?word2(num), ?word1?word2(num), ?word1?word2?word0(num)
|
||||
""" word(key or num)
|
||||
!word(key or num), !!word(key or num), !!!word(key or num)
|
||||
?word1?word(key or num)
|
||||
??word(key or num), ?word(key or num)
|
||||
?word1?word?word0(key or num)
|
||||
?word1?word?(key or num)
|
||||
??word?word0(key or num)
|
||||
?word1?word?(key or num)
|
||||
??word?(key or num), ?word?(key or num)
|
||||
"""
|
||||
w, n = m.group('w', 'n')
|
||||
c = w[0]
|
||||
@@ -893,7 +956,7 @@ class translator(object):
|
||||
if c not in '!?':
|
||||
return self.plural(w, n)
|
||||
elif c == '?':
|
||||
# ?[word1]?word2[?word0](var or num), ?[word1]?word2(var or num) or ?word2(var or num)
|
||||
# ?[word1]?word[?word0](key or num), ?[word1]?word(key or num) or ?word(key or num)
|
||||
(p1, sep, p2) = w[1:].partition("?")
|
||||
part1 = p1 if sep else ""
|
||||
(part2, sep, part3) = (p2 if sep else p1).partition("?")
|
||||
@@ -910,7 +973,8 @@ class translator(object):
|
||||
else:
|
||||
word = w[1:]
|
||||
fun = cap_fun
|
||||
return fun(self.plural(word, n))
|
||||
s = fun(self.plural(word, n))
|
||||
return s if PY2 else to_unicode(s)
|
||||
|
||||
s = m.group(1)
|
||||
part = regex_plural_tuple.sub(sub_tuple, s)
|
||||
|
||||
@@ -11,7 +11,8 @@ The gluon wsgi application
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
if False: import import_all # DO NOT REMOVE PART OF FREEZE PROCESS
|
||||
if False:
|
||||
import import_all # DO NOT REMOVE PART OF FREEZE PROCESS
|
||||
import gc
|
||||
|
||||
import os
|
||||
@@ -26,7 +27,7 @@ import random
|
||||
import string
|
||||
|
||||
from gluon._compat import Cookie, urllib2
|
||||
#from thread import allocate_lock
|
||||
# from thread import allocate_lock
|
||||
|
||||
from gluon.fileutils import abspath, write_file
|
||||
from gluon.settings import global_settings
|
||||
@@ -67,14 +68,14 @@ import gluon.messageboxhandler
|
||||
logging.gluon = gluon
|
||||
# so we must restore it! Thanks ozancag
|
||||
import locale
|
||||
locale.setlocale(locale.LC_CTYPE, "C") # IMPORTANT, web2py requires locale "C"
|
||||
locale.setlocale(locale.LC_CTYPE, "C") # IMPORTANT, web2py requires locale "C"
|
||||
|
||||
exists = os.path.exists
|
||||
pjoin = os.path.join
|
||||
|
||||
try:
|
||||
logging.config.fileConfig(abspath("logging.conf"))
|
||||
except: # fails on GAE or when logfile is missing
|
||||
except: # fails on GAE or when logfile is missing
|
||||
logging.basicConfig()
|
||||
logger = logging.getLogger("web2py")
|
||||
|
||||
@@ -182,12 +183,13 @@ def serve_controller(request, response, session):
|
||||
response._view_environment.update(page)
|
||||
page = run_view_in(response._view_environment)
|
||||
|
||||
# logic to garbage collect after exec, not always, once every 100 requests
|
||||
global requests
|
||||
requests = ('requests' in globals()) and (requests + 1) % 100 or 0
|
||||
if not requests:
|
||||
gc.collect()
|
||||
# end garbage collection logic
|
||||
if not request.env.web2py_disable_garbage_collect:
|
||||
# logic to garbage collect after exec, not always, once every 100 requests
|
||||
global requests
|
||||
requests = ('requests' in globals()) and (requests + 1) % 100 or 0
|
||||
if not requests:
|
||||
gc.collect()
|
||||
# end garbage collection logic
|
||||
|
||||
# ##################################################
|
||||
# set default headers it not set
|
||||
@@ -230,7 +232,7 @@ class LazyWSGI(object):
|
||||
|
||||
to call third party WSGI applications
|
||||
"""
|
||||
self.response.status = str(status).split(' ', 1)[0]
|
||||
self.response.status = int(str(status).split(' ', 1)[0])
|
||||
self.response.headers = dict(headers)
|
||||
return lambda *args, **kargs: \
|
||||
self.response.write(escape=False, *args, **kargs)
|
||||
@@ -254,6 +256,7 @@ class LazyWSGI(object):
|
||||
return [data]
|
||||
for item in middleware_apps:
|
||||
app = item(app)
|
||||
|
||||
def caller(app):
|
||||
return app(self.environ, self.start_response)
|
||||
return lambda caller=caller, app=app: caller(app)
|
||||
@@ -294,9 +297,9 @@ def wsgibase(environ, responder):
|
||||
response = Response()
|
||||
session = Session()
|
||||
env = request.env
|
||||
#env.web2py_path = global_settings.applications_parent
|
||||
# env.web2py_path = global_settings.applications_parent
|
||||
env.web2py_version = web2py_version
|
||||
#env.update(global_settings)
|
||||
# env.update(global_settings)
|
||||
static_file = False
|
||||
http_response = None
|
||||
try:
|
||||
@@ -325,7 +328,6 @@ def wsgibase(environ, responder):
|
||||
'Expires'] = 'Thu, 31 Dec 2037 23:59:59 GMT'
|
||||
response.stream(static_file, request=request)
|
||||
|
||||
|
||||
# ##################################################
|
||||
# fill in request items
|
||||
# ##################################################
|
||||
@@ -356,17 +358,15 @@ def wsgibase(environ, responder):
|
||||
cmd_opts = global_settings.cmd_options
|
||||
|
||||
request.update(
|
||||
client = client,
|
||||
folder = abspath('applications', app) + os.sep,
|
||||
ajax = x_req_with == 'xmlhttprequest',
|
||||
cid = env.http_web2py_component_element,
|
||||
is_local = (env.remote_addr in local_hosts and
|
||||
client == env.remote_addr),
|
||||
is_shell = False,
|
||||
is_scheduler = False,
|
||||
is_https = env.wsgi_url_scheme in HTTPS_SCHEMES or \
|
||||
request.env.http_x_forwarded_proto in HTTPS_SCHEMES \
|
||||
or env.https == 'on'
|
||||
client=client,
|
||||
folder=abspath('applications', app) + os.sep,
|
||||
ajax=x_req_with == 'xmlhttprequest',
|
||||
cid=env.http_web2py_component_element,
|
||||
is_local=(env.remote_addr in local_hosts and client == env.remote_addr),
|
||||
is_shell=False,
|
||||
is_scheduler=False,
|
||||
is_https=env.wsgi_url_scheme in HTTPS_SCHEMES or
|
||||
request.env.http_x_forwarded_proto in HTTPS_SCHEMES or env.https == 'on'
|
||||
)
|
||||
request.url = environ['PATH_INFO']
|
||||
|
||||
@@ -390,7 +390,7 @@ def wsgibase(environ, responder):
|
||||
% 'invalid request',
|
||||
web2py_error='invalid application')
|
||||
elif not request.is_local and exists(disabled):
|
||||
five0three = os.path.join(request.folder,'static','503.html')
|
||||
five0three = os.path.join(request.folder, 'static', '503.html')
|
||||
if os.path.exists(five0three):
|
||||
raise HTTP(503, file(five0three, 'r').read())
|
||||
else:
|
||||
@@ -406,7 +406,7 @@ def wsgibase(environ, responder):
|
||||
# get the GET and POST data
|
||||
# ##################################################
|
||||
|
||||
#parse_get_post_vars(request, environ)
|
||||
# parse_get_post_vars(request, environ)
|
||||
|
||||
# ##################################################
|
||||
# expose wsgi hooks for convenience
|
||||
@@ -625,7 +625,7 @@ def appfactory(wsgiapp=wsgibase,
|
||||
raise BaseException("Can't create dir %s" % profiler_dir)
|
||||
filepath = pjoin(profiler_dir, 'wtest')
|
||||
try:
|
||||
filehandle = open( filepath, 'w' )
|
||||
filehandle = open(filepath, 'w')
|
||||
filehandle.close()
|
||||
os.unlink(filepath)
|
||||
except IOError:
|
||||
@@ -746,7 +746,7 @@ class HttpServer(object):
|
||||
sock_list = [ip, port]
|
||||
if not ssl_certificate or not ssl_private_key:
|
||||
logger.info('SSL is off')
|
||||
elif not rocket.ssl:
|
||||
elif not rocket.has_ssl:
|
||||
logger.warning('Python "ssl" module unavailable. SSL is OFF')
|
||||
elif not exists(ssl_certificate):
|
||||
logger.warning('unable to open SSL certificate. SSL is OFF')
|
||||
|
||||
@@ -225,7 +225,7 @@ def parsecronline(line):
|
||||
params = line.strip().split(None, 6)
|
||||
if len(params) < 7:
|
||||
return None
|
||||
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3,
|
||||
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3,
|
||||
'thu': 4, 'fri': 5, 'sat': 6}
|
||||
for (s, id) in zip(params[:5], ['min', 'hr', 'dom', 'mon', 'dow']):
|
||||
if not s in [None, '*']:
|
||||
|
||||
Submodule gluon/packages/dal updated: 476ebfda67...b7677e52e8
@@ -10,7 +10,7 @@ Restricted environment to execute application's code
|
||||
"""
|
||||
|
||||
import sys
|
||||
from gluon._compat import pickle, ClassType
|
||||
from gluon._compat import pickle, ClassType, unicodeT, to_bytes
|
||||
import traceback
|
||||
import types
|
||||
import os
|
||||
@@ -192,10 +192,10 @@ class RestrictedError(Exception):
|
||||
# safely show an useful message to the user
|
||||
try:
|
||||
output = self.output
|
||||
if isinstance(output, unicode):
|
||||
output = output.encode("utf8")
|
||||
elif not isinstance(output, str):
|
||||
if not isinstance(output, str, bytes, bytearray):
|
||||
output = str(output)
|
||||
if isinstance(output, unicodeT):
|
||||
output = to_bytes(output)
|
||||
except:
|
||||
output = ""
|
||||
return output
|
||||
@@ -205,7 +205,7 @@ def compile2(code, layer):
|
||||
return compile(code, layer, 'exec')
|
||||
|
||||
|
||||
def restricted(ccode, environment=None, layer='Unknown'):
|
||||
def restricted(ccode, environment=None, layer='Unknown', scode=None):
|
||||
"""
|
||||
Runs code in environment and returns the output. If an exception occurs
|
||||
in code it raises a RestrictedError containing the traceback. Layer is
|
||||
@@ -230,7 +230,9 @@ def restricted(ccode, environment=None, layer='Unknown'):
|
||||
sys.excepthook(etype, evalue, tb)
|
||||
del tb
|
||||
output = "%s %s" % (etype, evalue)
|
||||
raise RestrictedError(layer, ccode, output, environment)
|
||||
# Save source code in ticket when available
|
||||
scode = scode if scode else ccode
|
||||
raise RestrictedError(layer, scode, output, environment)
|
||||
|
||||
|
||||
def snapshot(info=None, context=5, code=None, environment=None):
|
||||
|
||||
@@ -22,12 +22,11 @@ import re
|
||||
import logging
|
||||
import traceback
|
||||
import threading
|
||||
import urllib
|
||||
from gluon.storage import Storage, List
|
||||
from gluon.http import HTTP
|
||||
from gluon.fileutils import abspath, read_file
|
||||
from gluon.settings import global_settings
|
||||
from gluon._compat import urllib_unquote, urllib_quote, iteritems, xrange
|
||||
from gluon._compat import urllib_unquote, urllib_quote, iteritems, xrange, urllib_quote_plus
|
||||
|
||||
isdir = os.path.isdir
|
||||
isfile = os.path.isfile
|
||||
@@ -206,8 +205,7 @@ def url_out(request, environ, application, controller, function,
|
||||
if host is True or (host is None and (scheme or port is not None)):
|
||||
host = request.env.http_host
|
||||
if not scheme or scheme is True:
|
||||
scheme = request.env.get('wsgi_url_scheme', 'http').lower() \
|
||||
if request else 'http'
|
||||
scheme = request.env.get('wsgi_url_scheme', 'http').lower() if request else 'http'
|
||||
if host:
|
||||
host_port = host if not port else host.split(':', 1)[0] + ':%s' % port
|
||||
url = '%s://%s%s' % (scheme, host_port, url)
|
||||
@@ -236,7 +234,7 @@ def try_rewrite_on_error(http_response, request, environ, ticket=None):
|
||||
path_info, query_string = uri, ''
|
||||
query_string += \
|
||||
'code=%s&ticket=%s&requested_uri=%s&request_url=%s' % \
|
||||
(status, ticket, urllib.quote_plus(
|
||||
(status, ticket, urllib_quote_plus(
|
||||
request.env.request_uri), request.url)
|
||||
if uri.startswith('http://') or uri.startswith('https://'):
|
||||
# make up a response
|
||||
@@ -271,12 +269,12 @@ def try_redirect_on_error(http_object, request, ticket=None):
|
||||
elif '?' in redir:
|
||||
url = '%s&code=%s&ticket=%s&requested_uri=%s&request_url=%s' % \
|
||||
(redir, status, ticket,
|
||||
urllib.quote_plus(request.env.request_uri),
|
||||
urllib_quote_plus(request.env.request_uri),
|
||||
request.url)
|
||||
else:
|
||||
url = '%s?code=%s&ticket=%s&requested_uri=%s&request_url=%s' % \
|
||||
(redir, status, ticket,
|
||||
urllib.quote_plus(request.env.request_uri),
|
||||
urllib_quote_plus(request.env.request_uri),
|
||||
request.url)
|
||||
return HTTP(303, 'You are being redirected <a href="%s">here</a>' % url, Location=url)
|
||||
return http_object
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user